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 statements is correct? i) Change a reference changes the referent. ii) We can create an array of references.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.

2. What is the default value of a bitset?

0
1
-1
infinite

3. Constructor is executed when _____.

An object goes out of scope.
A class is declared
An object is created
An object is used

4. Which member function is used to determine whether the stream object is currently associated with a file?

is_open
Buf
String
None of the above

5. C++ runs on ?

Windows
MacOS
UNIX
All of the above

6. What is the output of this program?

#include <iostream>
using namespace std;
void find()
void find()
{
    cout<<"course";
}
int main()
{
    find();
    return 0;
} 

course
coursecourse
compile time error
none of the mentioned

7. Where does the abstract class is used?

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

8. Which of the following parameter passing mechanism(s) is/are supported by C++, but not by C?

Pass by value
Pass by reference
Pass by value-result
All of the above

9. While overloading binary operators using member function, it requires ___ argument?

2
1
0
3

10. What is the syntax for overriding a virtual function in a derived class?

virtual void functionName() const;
void functionName() override;
virtual void functionName() = 0;
void functionName() const override;

Results