Ask Question
19 November, 21:16

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 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

+1
Answers (1)
  1. 19 November, 23:34
    0
    d) Conditions 2, 3 and 4 are all true, Condition 1 is not

    Explanation:

    Condition 1: (x 0)

    This will evaluate to False because 50 = true.

    False && True = False

    Condition 2: (a! = d || x! = 5)

    This will evaluate to True because a! = d is True. X! = 5 is False.

    True || False = True

    Condition 3:! (true && false)

    This will evaluate to True because! (False) = True

    Condition 4: (x > y || a = = 'A' || d! = 'A')

    This will evaluate to True

    X>Y = True

    a=='A' is False

    d! = 'A' False

    True || False || False = True

    From the above, the correct answer is:

    d) Conditions 2, 3 and 4 are all true, Condition 1 is not
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “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 ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers