Site icon T4Tutorials.com

Operators and Expressions MCQs C++

1. Which of the following is a relational operator in C++?

(A) +


(B) !=


(C) &&


(D) %



2. Which operator is used for bitwise AND in C++?

(A) &


(B) &&


(C) |


(D) ||



3. What is the output of int x = 5; cout << x++ << endl;?

(A) 5


(B) 6


(C) 0


(D) Error



4. Which operator is used for logical OR in C++?

(A) |


(B) ||


(C) or


(D) &&



5. What is the precedence of the * operator in C++?

(A) Higher than +


(B) Lower than +


(C) Same as +


(D) Cannot be compared



6. Which of the following is a ternary operator in C++?

(A) ? :


(B) &&


(C) ||


(D) ++



7. Which operator is used for modulus operation?

(A) /


(B) %


(C) &


(D) *



8. What is the output of int a = 4, b = 5; cout << (a & b);?

(A) 1


(B) 4


(C) 5


(D) 0



9. Which of the following is a unary operator?

(A) +


(B) ++


(C)


(D) All of the above



10. What is the result of 3 + 4 * 2 in C++?

(A) 14


(B) 11


(C) 10


(D) 7



11. Which operator is used for pointer dereferencing in C++?

(A) &


(B) >


(C) *


(D) %



12. Which of the following is the assignment operator?

(A) ==


(B) =


(C) +=


(D) Both B and C



13. Which operator is used for member access through pointer?

‘)”> (A)


‘)”> (B) >


‘)”> (C) *


‘)”> (D) &



14. Which operator has higher precedence in C++?

(A) +


(B) <<


(C) *


(D) &&



15. Which of the following is a logical NOT operator in C++?

(A) !


(B) ~


(C) ^


(D) &



Exit mobile version