C++ MCQ Questions and Answers
Practice ModeShowing 10 of 93 questions
Q31
Regarding following statement which of the statements is true?
const int pathwidth=100;
Answer: Option C
Q32
In an assignment statement
Answer: Option D
Q33
In an assignment statement a=b;
Which of the following statement is true?
Answer: Option B
Q34
All of the following are valid expressions in C++
a = 2 + (b = 5);
a = b = c = 5;
a = 11 % 3
Answer: Option A
Q35
To increase the value of c by one which of the following statement is wrong?
Answer: Option C
Q36
When following piece of code is executed, what happens?
b = 3;
a = b++;
Answer: Option A
Q37
The result of a Relational operation is always
Answer: Option A
Q38
Which of the following is not a valid relational operator?
Answer: Option B
Q39
What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?
Answer: Option A
Q40
When does the code block following while(x<100) execute?
Answer: Option A