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;
int lfc (int a, int b)
{
    return (a * b);
}
float lfc (float a, float b)
{
    return (a / b);
}
int main()
{
    int x = 5, y = 2;
    float n = 5.0, m = 2.0;
    cout << lfc(x, y) <<"	";
    cout << lfc (n, m);
    return 0;
} 

10.0 5.0
5.0 2.5
10.0 5
10 2.5

2. Typical bit width of char is?

0 byte
1byte
2byte
3byte

3. Can we have overloading of the function templates?

Yes
No
May Be
Can't Say

4. When are the Global objects destroyed?

When the control comes out of the block in which they are being used
When the program terminates
When the control comes out of the function in which they are being used.
As soon as local objects die

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

6. How many loops are there in C++ 98?

2
3
4
5

7. Which symbol is used to create multiple inheritance?

Dot
Comma
Dollar
None of the above

8. What is true about bitset?

A bitset is an array of bool 
A limitation of bitset is, N must be known at compile time
As bitset stores the same information in compressed manner the operation on bitset are faster than that of array and vector.
All of the above

9. Virtual functions cannot be static.

TRUE
FALSE
Can be true or false
Can not say

10. Which of the things does not require instantiation?

Functions
Non virtual member function
Member class
All of the above

Results