Which operator is used to check if two values are equal?
- !=
- =
- ==
- ===
In C, the '==' (double equals) operator is used to check if two values are equal. It is a comparison operator, while '=' is an assignment operator. Confusing these can lead to unintended consequences, making it crucial to understand their distinct purposes in programming.
Loading...
Related Quiz
- When defining a structure in C, which keyword is used?
- In a union, all members share the same ________.
- In C, the ________ function is used to write a string to a file.
- When defining a bit field, what does the number after the colon represent?
- In C, a function pointer can be used to call a function without knowing its ________ at compile time.