Top 80+ Solved CPP Programming MCQ Questions Answer

From 46 to 60 of 86

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

  • b. extensible

Q. Choose the operator which cannot be overloaded.

a. /

b. ( )

c. ::

d. %

  • c. ::

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.

  • a. Constructor

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

  • b. Sequential access file

Q. What is the built in library function to compare two strings?

a. string_cmp()

b. strcmp()

c. equals()

d. str_compare()

  • b. strcmp()

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

  • a. Only 1, 3, 4

Q. Which of the followings is/are pointer-to-member declarator?

a. ->*

b. .*

c. ::*

d. both A and B

  • c. ::*

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

  • b. Function Overloading

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

  • b. Function is declared

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

  • c. Both a and b

Q. Return type of uncaught_exception () is ________________.

a. int

b. bool

c. char *

d. double

  • b. bool

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

  • c. Compiler will check for appropriate catch handler of outer try block

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()

  • c. unexpected()
Subscribe Now

Get All Updates & News