COMPUTER PROGRAMMING FUNDAMENTALS
5 BASIC ELEMENTS OF PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
True
|
|
False
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -A boolean expression(named for mathematician George Boole) is an expression that evaluates to either true or false.
Detailed explanation-2: -The 10 == ‘10’ expression returns true because the equality operator (==) checks to see if two operands are equal regardless of the operand type. As such, the code is able to determine that the integer 10 is equal to the string 10 mathematically.
Detailed explanation-3: -Traditionally, the result of a logical or Boolean expression is considered true if it evaluates to 1 and false if it evaluates to 0.
Detailed explanation-4: -Logical expressions, like comparison expressions, return a true (1) or false (0) value when processed. Logical operators combine two comparisons and return the true (1) or false (0) value depending on the results of the comparisons.