General Questions

Question 26 :

Which of the following statement is correct?


A). A constructor has the same name as the class in which it is present.
B). A constructor has a different name than the class in which it is present.
C). A constructor always returns an integer.
D). A constructor cannot be overloaded.
Answer : Option A

Question 27 :

Which of the following implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class?


A). Preprocessor
B). Linker
C). Loader
D). Compiler
Answer : Option D

Question 28 :

A destructor takes __________ arguments.


A). one
B). two
C). three
D). no
Answer : Option D

Question 29 :

Destructor calls are made in which order of the corresponding constructor calls?


A). Reverse order
B). Forward order
C). Depends on how the object is constructed
D). Depends on how many objects are constructed
Answer : Option A

Question 30 :

Which of the following never requires any arguments?


A). Member function
B). Friend function
C). Default constructor
D). const function
Answer : Option C