A function call mechanism that passes arguments to a function by passing a copy of the values of the arguments is
(A) call by name (B) call by value
(C) call by reference (D) call by value result
Ans: B
In C++, dynamic memory allocation is accomplished with the operator
(A) new (B) this
(C) malloc( ) (D) delete
Ans: A
If we create a file by ‘ifstream’, then the default mode of the file is
(A) ios :: out (B) ios :: in
(C) ios :: app (D) ios :: binary
Ans: B
A variable defined within a block is visible
(A) from the point of definition onward in the program.
(B) from the point of definition onward in the function.
(C) from the point of definition onward in the block.
(D)throughout the function.
| Ans: C The process of building new classes from existing one is called (A) Structure. (B) Inheritance. (C) Polymorphism. (D) Template. The operator that cannot be overloaded is (A) ++ (B) :: (C)( ) (D) ~ Ans: B Declaration of a pointer reserves memory space (A) for the object. (B) for the pointer. (C) both for the object and the pointer. (D) none of these. Ans:B | |
The operator << when overloaded in a class
| (A) must be a member function (C) can be both (A) & (B) above | (B) (D) | must be a non member function cannot be overloaded |
Ans:C Identify the operator that is NOT used with pointers (A) -> (B) & (C) * (D) >> Ans:D | | |
0 comments:
Post a Comment