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. Which type of program is recommended to include in try block?

Static memory allocation
Dynamic memory allocation
Const reference
Pointer

2. What will be the output of this program?

         
Note:Includes all required header files
using namespace std;
    int main ()
    {
        int p = 10;
        double q = 1.14;
        
        cout << p + q;
        endl (cout);
        return 0;
    }

10
1.14
11.14
All of the above

3. Which of the following methods can be used to open a file in file handling?

Using Open ( )
Constructor method
Destructor method
Both A and B

4. Which of the following operators cannot be overloaded ?

Static function
Virtual function
Const function
Operator function

5. Where does the abstract class is used?

base class only
derived class
both derived & base class
virtual class

6. For Cat and Animal class, correct way of inheritance is

Class Cat: public Animal
Class Animal: public Cat
Both are correct way
None is correct way

7. What will be the output of this program?

        
Note:Includes all required header files
using namespace std;
   int main()
   {
       int find[] = {1, 2, 3, 4};
       int *p = (find + 1);
       cout << find;
       return 0;
   }  

1
2
address of find
4

8. 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

9. Which of the following concepts is used to implement late binding?

Static function
Virtual function
Const function
Operator function

10. Which of the following is the correct way of declaring a tuple?

tuple tp;
tuple tp = new tuple;
tuple tp;
Tuple tp;

Results