Answer: Only A and C
Explanation: Default constructor is a constructor that has parameters with the values that are default or has no arguments/parameter present. Default constructor is not declared in the class rather it gets generated by itself when not defined.
Class is defined with data members, functions, objects etc are considered as per the requirement given by the user .It is the user defined concept.
Statement (B) is incorrect because static method is used for accessing the static members of the particular class and manipulate the value of it.
Thus, only statement (A) and (C) are correct.
Answer:
A. 4 CPUs and 6 megabyte cache memory
B. 1.3157 x10^-9 nanoseconds
Explanation:
The Intel core i5 7500 is a seventh generation central processing unit with a 4 CPU core and a 6 megabyte cache memory. It executes task at a clock cycle of 5 clock cycle at a speed of 3.8 GHz.
The relationship between frequency and clock cycle is,
Clock cycle = 1 / ( frequent).
So, One clock cycle = 1 / 3.8 GHz
= 0.3 x10^-9
For five clock cycles = 5 x 0.3 x10^-9
= 1.3157 x10^-9 nanoseconds.
Answer: much too long to write here: see attached
Explanation:
Answer:
The complete method is as follows:
public List buildList(List L)
{
L.insert(30);
L.insert(23);
L.insert(19);
L.insert(4);
return L;
}
Explanation:
To complete the method, we make use of the insert() function.
This inserts elements of the list into list L. However, we have to start from the last element (i.e. in descending order)
So, the explanation is as follows:
L.insert(30); --- This inserts the last element
Continue inserting in descending order
<em> L.insert(23); </em>
<em> L.insert(19);
</em>
Until the first list element is inserted
L.insert(4);
This returns the filled list L
return L;
Answer:
a. x = 5
b. x = 7
Explanation:
a)
OUTPUT: x = 5
In the main() function, fun1() is evaluated first and it updates the value of the global variable to 2 and returns 3.
The second function returns the value of the global variable 'a' and this variable has value 2.
So,
x = 3 + 2
x = 5
b)
OUTPUT: x = 7
In the main() function, fun2() is evaluated first and it returns 4 because global variable 'a' is initialized with value 4.
The second function fun()1 will returns the value 3.
So,
x = 4 + 3
x = 7