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 of the following gets called when an object is being created?

Constuctor
Virtual Function
Destructors
Main

2. What is the general syntax for accessing the namespace variable?

namespace::operator
namespace,operator
namespace#operator
namespace$operator

3. Which operator is used to access the nth bit in a bitset?

$
#
[]
*

4. Virtual functions cannot be static.

TRUE
FALSE
Can be true or false
Can not say

5. When a copy constructor may be called?

When an object of the class is returned by value
When an object of the class is passed (to a function) by value as an argument.
Both A & B
None of the above

6. What is the scope of the variable declared in the user defined function?

Whole program
Only inside the {} block
The main function
None of the above

7. Which of the things does not require instantiation?

Functions
Non virtual member function
Member class
All of the above

8. Which of the following is true about the following program

#include <iostream>
using namespace std;

int main()
{
    int p = 45; 
    int &q = p;
    p++;
    cout << p << " " << --q;
    return 0;
}  

The program will print the output 45 45.
The program will print the output 46 40.
The program will print the output 46 46.
It will result in a compile time error. View Answer

9. What should be included in try block in c++ programming language?

Static value
Dynamic allocation
None of the above
Const value

10. Space taken by bitset bs is less than?

bool bs[N]
vector bs(N)
Both A and B
None of the above

Results