Signup/Sign In

C++ Programming MCQs Test 1

This Test will cover complete C++ with very important questions, starting off from basics to advanced level.
Q. What is cfront?
Q. The following program fragment __________.
#include <iostream>
using namespace std;

int i = 10;
int main()
{
  int i = 20;
  {
   int i = 30;
	 cout << i << ::i;
   }
	 return 0;
}
Q. Which of the following are procedural languages?
Q. For the below defined function abc, Which of the following function calls is/are illegal? (Assume h,g are declared as integers)
void abc(int x=0, int y=0)
{
        cout << x<< y;
}

Q. The following C++ code results in :
#include "iostream"
void main(void)
{
	cout << (int i=5) << (int j=6);
}
Q. Reusability is a desirable feature of a language as it __________.
Q. Choose the correct statements regarding inline functions.
Q. If many functions have the same name, which of the following information, if present, will be used by the compiler to invoke the correct function to be used?
Q. The below statement outputs __________?
int a = 5;
cout << "FIRST" << (a<<2) << "SECOND";

Q. Choose the correct remarks.
Q. A constructor is called whenever __________.
Q. Which of the following remarks about the differences between constructors and destructors are correct?
Q. The following program fragment __________.
#include <iostream>
using namespace std;

int main()
{
  int x = 10;
	int &p = x;
	cout<< &p<< &x;
	return 0;
}
Q. The declaration int x; int &p=x; is same as the declaration int x, *p; p=&x;. This remark is?
Q. The following program segment __________.
const int m=10;
int &n=m;
n=11;
cout << m << n;

Related Tests:


Explore more Subjects:

Tests for various other programming languages and subjects: