Top 150+ Solved Object Oriented Programming with C++ (OOP in C++) MCQ Questions Answer
Q. Which of the following function that must contain in all C++ Programs
a. start()
b. system()
c. main()
d. program()
Q. Which one of the following is the correct operator to compare two values
a. :=
b. =
c. Equal
d. = =
Q. C++ is originally developed by
a. Nicolas Wirth
b. Dennis Ritchi
c. Bjarne Stroustrup
d. Ken Thompson
Q. The operator ‘<< ‘is called
a. Get from operator
b. Put to operator
c. Extraction operator
d. None of these
Q. To increase the value of c by one which of the following statement is wrong?
a. c++;
b. c = c + 1;
c. c + 1 => c;
d. c += 1
Q. In an assignment statement a=b Which of the following statement is true?
a. The variable a and the variable b are equal.
b. The value of b is assigned to variable a but the later changes on variable b will not affect the value of variable a
c. The value of b is assigned to variable a and the later changes on variable b will affect the value of variable a
d. The value of variable a is assigned to variable b and the value of variable b is assigned to variable a.
Q. The continue statement
a. resumes the program if it is hanged
b. resumes the program if it was break was applied
c. skips the rest of the loop in current iteration
d. all of above
Q. Find out the error in following block of code. If (x = 100) Cout << “x is 100”;
a. 100 should be enclosed in quotations
b. There is no semicolon at the end of first line
c. Equals to operator mistake
d. Variable x should not be inside quotation
Q. When following piece of code is executed, what happens?b = 3; a = b++;
a. a contains 3 and b contains 4
b. a contains 4 and b contains 4
c. a contains 4 and b contains 3
d. a contains 3 and b contains 3
Q. In case of arguments passed by values when calling a function such as z=addidion(x,y),
a. Any modifications to the variables x & y from inside the function will not have any effect outside the function.
b. The variables x and y will be updated when any modification is done in the function
c. The variables x and y are passed to the function addition
d. None of above are vali