C++ Programming Quiz


Play this c++ quiz that will help you to excel in C++ certification exams, placements etc. This C++ programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This C++ programming test enables you to assess your knowledge of C++ programming.

Take the Free Practice Test



C++ MCQs

Practice C++ MCQ Questions, which will help you to understand C++ programming related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

C++ Quiz

Try Free C++ Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

C++ Quiz

1. What kind of exceptions are available in c++?

Handled
Unhandled
Static
Dynamic

2. What is the output of this program?

#include <iostream>
using namespace std;
class course
{  
  int member;
  public : int* lfc()
  { 
    return & member; 
  }
};
main()
{
course s;
int *ptr=s.lfc();
return 0;
}  

This code is good to go
This code may result in undesirable conditions
This code will generate error
This code violates encapsulation

3. If many functions-have the same name, which of the following information, if present, will be used by the compiler to invoke the correct function to be used?

The operator : :
The return value of the function
Function signature
Both A & C

4. Which of the following in Object Oriented Programming is supported by Function overloading and default arguments features of C++.

Inheritance
Polymorphism
Encapsulation
None of these

5. The OOPs concept in C++, exposing only necessary information to users or clients is known as

Data hiding
Encapsulation
Hiding complexity
Abstraction

6. Which operator can not be overloaded?

+
::
-
*

7. Which of the following statements are true about Catch handler? i) It must be placed immediately after try block T. ii) It can have multiple parameters. iii) There must be only one catch handler for every try block. iv) There can be multiple catch handler for a try block T. v) Generic catch handler can be placed anywhere after try block.

Only i, iv, v
Only i, ii, iii
Only i, iv
Only i, ii

8. The pointer can point to any variable that is not declared with which of these?

Const
Volatile
Both A & B
Static

9. If private member functions are to be declared in C++ then __________

private(private member list)
private
private:
private :-

10. Which other keywords are also used to declare the class other than class?

Struct
Union
Object
Both struct & union

Results