12) Assume that x and y are int variables with x = 5, y = 3, and a and d are cha
ID: 673753 • Letter: 1
Question
12) Assume that x and y are int variables with x = 5, y = 3, and a and d are char variables with a = 'a' and d = 'A', and examine the following conditions:
Condition 1: (x < y && x > 0)
Condition 2: (a != d || x != 5)
Condition 3: !(true && false)
Condition 4: (x > y || a == 'A' || d != 'A')
a) All 4 Conditions are true
b) Only Condition 2 is true
c) Condition 2 and Condition 4 are true only
d) Conditions 2, 3 and 4 are all true, Condition 1 is not
e) All 4 Conditions are false
Also explain the theory behind !(TRUE && FALSE). How is this a condition?It is not true,it is also not false.
Explanation / Answer
d. Conditions 2, 3 and 4 are all true, Condition 1 is not
in !(TRUE && FALSE) = !(FALSE) = TRUE [because true && false is false and !false is true)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.