...
Question 3556 – UGC NET CS 2016 Aug- paper-2
October 29, 2023
Question 7636 – ICT
October 29, 2023
Question 3556 – UGC NET CS 2016 Aug- paper-2
October 29, 2023
Question 7636 – ICT
October 29, 2023

Question 3558 – UGC NET CS 2016 Aug- paper-2

Given i= 0, j = 1, k = –1, x = 0.5, y = 0.0 What is the output of given ‘C’ expression ?
x * 3 && 3 || j | k

Correct Answer: C

Question 11 Explanation: 
Step-1: Evaluate x ​ * 3 because multiplication has more priority than remaining operators x * 3→ 1.5
Step-2: && is logical AND. Both the statements are TRUE, then it returns 1 otherwise 0.
1.5 && 3 is TRUE. So, it returns 1.
Step-3: j | k is bitwise OR operator. It returns -1.
Step-4: ((x * 3) && 3) || (j | k) islogical OR operator. It returns 1
Note: The precedence is ((x * 3) && 3) || (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!!