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 will be the output of the following program?

#include <iostream>

using namespace std;
class LFC
{
    static int x; 
    public:
    static void Set(int xx)
    {
        x = xx; 
    }
    void Display() 
    {
        cout<< x ;
    }
};
int LFC::x = 0; 
int main()
{
    LFC::Set(33);
    LFC::Display();
    return 0; 
}

The program will print the output 0.
The program will print the output 33.
The program will print the output Garbage.
The program will report compile time error.

2. Dereference operator is also called as

pointer
Reference operator
Offset operator
Deoffset operator

3. C++ is an extension of C language?

Yes
No
Can be yes or no
Can not say

4. The maths function acos (x) stands for

Inverse Cosine of x
Inverse Sine of x
Inverse Tangent of x
Floor of x

5. Which of the following is the limitation of bitset over vector bool?

Space
Size
Type
Speed

6. A References is :

A variable that holds memory address.
A Alias to an existing variable.
Alias to an existing variable and holds memory address.
None of the above

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. Predict the output:

float x= 3.1496;
cout << setprecision(2) << x;

3.14
3.15
3
3.1

9. Which operator is used to de-references to an object?

#
&
*
None of the above

10. C++ developed in?

1977
1978
1979
1980

Results