Signup/Sign In

C++ Programming MCQs Test 10

This Test will cover complete C++ with very important questions, starting off from basics to advanced level.
Q. By default the members of the structure are __________.
Q. What is meant by template parameter?
Q. What is the output of the following C++ program?
#include<iostream>
using namespace std;

int main()
{
	double a = 21.09399;
	float b = 10.20;
	int c ,d;
	c = (int) a;
	d = (int) b;
	cout << c <<'\t'<< d;
	return 0;
}
Q. What is the output of the following C++ program?
#include<iostream>
using namespace std;

class abc
{
  public:
	int i;
	abc(int i)
    {
      i = i;
	 }
};

int main()
{
	abc m(5);
	cout << m.i;
    return 0;
}

Q. What is the output of the following C++ program?
#include<iostream>
using namespace std;

int main()
{
	union abc
  {
	  int x;
	char ch;
}
  var;
  var.ch = 'A';
  cout << var.x;
  return 0;
}
Q. Which parameter is legal for non-type template?
Q. What is other name of full specialization?
Q. How many bits of memory needed for internal representation of a class?
Q. What is the output of the following C++ program?
#include<iostream>
using namespace std;

int main()
{
	class student
	{
		int rno = 10;
	} v;
	cout << v.rno;
    return 0;
}

Q. What is the ability to group some lines of code that can be included in the program?
Q. What does the client module import?
Q. Escape sequence character \0 occupies __________ amount of memory.
Q. What is the output of the following C++ program?
#include<iostream>
using namespace std;

int main()
{
	int i = 13, j = 60;
	i ^= j;
	j ^= i;
	i ^= j;
	cout << (i) <<" "<< (j)
    return 0;
}
Q. What is the general syntax for accessing the namespace variable?
Q. Where does a cin stops during extraction of data?

Related Tests: