Which operator is used to compare if two values are equal in C++?
- ==
- =
- ===
- !=
In C++, the == operator is used for equality comparison. It checks if the values of two operands are equal. On the other hand, = is an assignment operator, === is not valid in C++, and != is the not-equal operator.
Loading...
Related Quiz
- Which arithmetic operator is used to perform division in C++?
- The use of _______ in nested if-else structures can sometimes enhance readability and maintainability of the code.
- In tail recursion, the recursive call is the _______ action to be performed in the function.
- Which of the following statements about the struct and class keywords is true?
- Which of the following C++ standards introduced smart pointers?