...
Question 3663 – UGC NET CS 2016 July- paper-2
March 15, 2024
Question 3665 – UGC NET CS 2016 July- paper-2
March 15, 2024
Question 3663 – UGC NET CS 2016 July- paper-2
March 15, 2024
Question 3665 – UGC NET CS 2016 July- paper-2
March 15, 2024

Question 3664 – UGC NET CS 2016 July- paper-2

Given i = 0, j = 1, k = –1 x = 0.5, y = 0.0 What is the output of the following expression in C language ?
x * y < i + j || k

Correct Answer: C

Question 11 Explanation: 
x * y < i + j || k
Step-1: Evaluate x * y because multiplication has more priority than remaining operators
x * y→ 0
Step-2: i + j is 1
Step-3: (x*y) < (i+j) is 1. Because relational operators only return 1(TRUE) or 0(FALSE).
Step-4: ((x*y) < (i+j)) || k is logical OR operator.
1 || -1 will returns 1.
Note: The precedence is ((x*y) < (i+j)) || k
A
-1
B
0
C
1
D
2
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!