Top 80+ Solved CPP Programming MCQ Questions Answer
Q. When a language has the capability to produce new data type mean, it can be called as …...
a. overloaded
b. extensible
c. encapsulated
d. reprehensible
Q. Which operator is required to be overloaded as member function only?
a. _
b. _ _
c. ++ (postfix version)
d. =
Q. Class function which is called automatically as soon as the object is created is called as __
a. Constructor
b. Destructor
c. Friend function
d. Inline function.
Q. Which type of data file is analogous to an audio cassette tape?
a. Random access file
b. Sequential access file
c. Binary file
d. Source code file
Q. What is the built in library function to compare two strings?
a. string_cmp()
b. strcmp()
c. equals()
d. str_compare()
Q. Which of the following are member dereferencing operators in CPP?1. * 2. :: 3. ->* 4. ::* 5. ->
a. Only 1, 3, 4
b. Only 1 and 5
c. Only 3 and 4
d. Only 3,4,5
Q. Assigning one or more function body to the same name is called ____________.
a. Function Overriding
b. Function Overloading
c. Both A and B
d. None of the above
Q. Default values for a function are specified when ____.
a. Function is defined
b. Function is declared
c. Both a and b
d. None of these
Q. Which of the following best defines the syntax for template function?
a. Template
b. Template return_type Function_Name(Parameters)
c. Both a and b
d. None of these
Q. If inner catch handler is not able to handle the exception then__________.
a. Compiler will look for outer try handler
b. Program terminates abnormally
c. Compiler will check for appropriate catch handler of outer try block
d. None
Q. Attempting to throw an exception that is not supported by a function call results in calling _____________ library function.
a. indeterminate ()
b. unutilized()
c. unexpected()
d. unpredicted()
Q. The code of statements which may cause abnormal termination of the program should bewritten under_________ block.
a. Try
b. catch
c. Finally
d. None of these