Advanced C++              MCQs to Test Your             Knowledge

10

A. 2var_name  B. 2VAR_NAME  C. $varname  D. var_name12

1. Which of the following is the correct identifier?

Check out the answer here!

2. Which of the following is not a type of inheritance?

Check out the answer here!

A. Multiple  B. Multilevel  C. Distributed  D. Heirarchical

3. Identify the correct escape sequence used for the new line.

Check out the answer here!

A. \t  B. \n  C. \a  D. None

4. Data members and member functions of a class are private by.default. True or False?

Check out the answer here!

A. True  B. False  C. Depends on code  D. None

5. Choose the option below which is not a member of class.

A. Friend function  B. Static function  C. Virtual function  D. Const function

Check out the answer here!

6. Identify the storage classes that have global visibility.

Check out the answer here!

A. extern  B. auto  C. register  D. static

7. How much bytes of memory does void occupy?

Check out the answer here!

A. 1  B. 0  C. 2  D. 4

8. Choose the type of loop which is guaranteed to execute at-least once.

Check out the answer here!

A. for loop  B. do-while  C. while  D. None

9. Identify the format string among the following.

Check out the answer here!

A. &  B. \n  C. %d  D. None

Check out the answer here!

10. When can an inline function be expanded?

A. Runtime  B. Compile time  C. Never gets expanded  D. All of the above

Are you prepared  to assess your C++ Programming Skills?

Demonstrate your expertise by taking our quiz. Simply click on the ""Try it now"" button to commence.  Best of luck!

Scaler Data Science  & Machine Learning Program!

Sign up for Scaler's free masterclasses and events to learn about the latest trends in the IT industry and become a pro.  Don't hesitate any longer, register today!