FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What values does a Boolean expression have?
A
In or Out
B
True or False
C
Right or Wrong
D
None of the above
Explanation: 

Detailed explanation-1: -When you are supplying a Boolean value, you can type either YES, ON, or TRUE for a true value, and NO, OFF, or FALSE for a false value.

Detailed explanation-2: -Cast to TRUE: ‘t’, ‘true’, ‘y’, ‘yes’, ‘on’, ’1’ Cast to FALSE: ‘f’, ‘false’, ‘n’, ‘no’, ‘off’, ‘0’

Detailed explanation-3: -A variable of the primitive data type boolean can have two values: true and false (Boolean literals). or off. Boolean expressions use relational and logical operators. The result of a Boolean expression is either true or false.

Detailed explanation-4: -TRUE has the numeric value of 1, FALSE is equal to 0. In some cases, a Boolean expression can return NULL.

Detailed explanation-5: -Boolean Variables and Data Type ( or lack thereof in C ) Zero is used to represent false, and One is used to represent true. For interpretation, Zero is interpreted as false and anything non-zero is interpreted as true.

There is 1 question to complete.