CS 159 LAB 6 EXAM QUESTIONS AND
ANSWERS GRADED A+ 2026
A piece of data is called logical if it conveys the idea of true or false. - ANS true
C programmers use other types, such as integers, to represent logical data. - ANS true
If a data value is zero it is considered false, but any non-zero value is considered true. -
ANS true
The logical AND (&&) operator is true only when both operands are true. - ANS true
The logical OR (||) operator is true only when exactly one of its operands is true - ANS false;
could be both are true
The AND and OR operator share the same level of operator precedence. - ANS false; AND is
higher
The short-circuit method of evaluating logical expressions will stop evaluating the current
expression as soon as the result can be determined. - ANS true
Relational Operators - ANS less than, greater than, <=, >=; higher precedence than the
equality operators
@COPYRIGHT 2026/2027 ALLRIGHTS RESERVED 1
ANSWERS GRADED A+ 2026
A piece of data is called logical if it conveys the idea of true or false. - ANS true
C programmers use other types, such as integers, to represent logical data. - ANS true
If a data value is zero it is considered false, but any non-zero value is considered true. -
ANS true
The logical AND (&&) operator is true only when both operands are true. - ANS true
The logical OR (||) operator is true only when exactly one of its operands is true - ANS false;
could be both are true
The AND and OR operator share the same level of operator precedence. - ANS false; AND is
higher
The short-circuit method of evaluating logical expressions will stop evaluating the current
expression as soon as the result can be determined. - ANS true
Relational Operators - ANS less than, greater than, <=, >=; higher precedence than the
equality operators
@COPYRIGHT 2026/2027 ALLRIGHTS RESERVED 1