C++ MCQ Questions and Answers
Practice ModeShowing 10 of 93 questions
Q61
The size of following variable is not 4 bytes in 32 bit systems
Answer: Option C
Q62
Identify the correct statement regarding scope of variables
Answer: Option B
Q63
Find out the error in following block of code.
If (x = 100)
Cout << "x is 100";
Answer: Option C
Q64
Looping in a program means
Answer: Option B
Q65
The difference between while structure and do structure for looping is
Answer: Option D
Q66
Which of the following is not a looping statement in C?
Answer: Option B
Q67
Which of the following is not a jump statement in C++?
Answer: Option D
Q68
Which of the following is selection statement in C++?
Answer: Option D
Q69
The continue statement
Answer: Option C
Q70
Consider the following two pieces of codes and choose the best answer
Code 1:
switch (x) {
case 1:
cout <<"x is 1";
break;
case 2:
cout <<"x is 2";
break;
default:
cout <<"value of x unknown";
}
Code 2
If (x==1){
Cout <<"x is 1";
}
Else if (x==2){
Cout << "x is 2";
}
Else{
Cout <<"value of x unknown";
}
Answer: Option A