COMPUTER PROGRAMMING FUNDAMENTALS
5 BASIC ELEMENTS OF PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which of the following is NOT a logical operator in C++ language?
|
&
|
|
&&
|
|
||
|
|
!
|
Explanation:
Detailed explanation-1: -! is a NOT operator. So, ‘&’ is not a Logical operator.
Detailed explanation-2: -The “not” (!) The “not” logical operator is used to convert a value from true to false, or from false to true. Similarly, if an operand evaluates to true, a logical “not” would cause it to evaluate to false. If an operand evaluates to false, its logical “not” equivalent would be true.
Detailed explanation-3: -Logical operators: || is a Logical OR operator. ! is a NOT operator. So, ‘&’ is not a Logical operator.
Detailed explanation-4: -We have three major logical operators in the C language – Logical NOT (!), Logical OR (||), and Logical AND (&&).
There is 1 question to complete.