20
Question Question 20
What would following code fragments result in? Given x = 3.
(a) 1 < x
(b) x >= 4
(c) x == 3
(d) x == 3.0
(e) "Hello" == "Hello"
(f) "Hello" > "hello"
(g) 4/2 == 2.0
(h) 4/2 == 2
(i) x < 7 and 4 > 5.
Answer
(a) True
(b) False
(c) True
(d) True
(e) True
(f) False
(g) True
(h) True
(i) False