CS201 Quiz-4 by Vu Topper RM
CS201 Quiz-4 by Vu Topper RM
CS201 Quiz-4 by Vu Topper RM
85 To 100% Marks
A file opened with the help of ______________ can be used for both
input and output.
A. Fstream Page 220
B. Ofstream
C. Iostream
D. Ifstream
When we include the header file in the angle brackets the compiler
searches for it in ______________.
A. All the drives
B. Current folder
C. Current directory Page 269
D. Specific directory
Identify the correct syntax for making a class friend of other class
friend ClassOne
{
OtherClass;
private;
//here we write the data members of ClassOne
};
lassOne
{friend OtherClass ;
private:
//here we write the data members of ClassOne
Let suppose
int a, b, c, d, e; a = b = c = d = e = 42;
This can be interpreted by the complier as:
a = (b = (c = (d = (e = 42))));
_______ operators are the ones that require only one operator to work.
A. Unit
B. Unary Page 370
C. Binary
We can ________________references.
A. Reassign
B. Increment
C. Decrement
D. None of the given Google
The function will return a reference to the global variable that exists
throughout the program and thus there will be no danger of
_______________.
A. System crash
B. Garbage collection
C. Dangling reference Page 365
D. Wastage of memory
The only operator that the compiler overloads for user define data type
by default is
A. Plus (+) operator Google
B. Minus (-) operator
C. Equal (==) operator
D. Assignment (=) operator