Home / Engineering / CPP Programming MCQs / Page 1
CPP Programming MCQs | Page - 1
Dear candidates you will find MCQ questions of CPP Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
M
Q. 1) Which of the followings is/are automatically added to every class, if we do not write our own?
M
Q. 2) When a copy constructor may be called?
M
Q. 3) Constructors have _____ return type.
M
Q. 4) Implicit return type of a class constructor is:
M
Q. 5) Which of the following is true about constructors?
1) They cannot be virtual.
2) They cannot be private.
3) They are automatically called by new operator.
M
Q. 6) Output of following program?
#include<iostream>
using namespace std;
class Point {
Point() { cout << "Constructor called"; }
}; int main()
{
Point t1;
return 0;
}
M
Q. 7) #include<iostream>
using namespace std;
class Point {
public:
Point() { cout << "Constructor called"; }
};
int main()
{
Point t1, *t2;
return 0;
}
M
Q. 8) Which operator is having the highest precedence?
M
Q. 9) Which of the following is FALSE about references in C++?
M
Q. 10) Which of the following functions must use reference?
Explore More Categories
Click on category to learn MCQs of that category.Electronics and Communication Engineering