Ask Question
22 August, 08:21

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

+4
Answers (1)
  1. 22 August, 08:31
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers