...
Question 11595 – Operator
November 15, 2023
GATE 2002
November 15, 2023
Question 11595 – Operator
November 15, 2023
GATE 2002
November 15, 2023

Question 11334 – Operator

main( )
{
   int x;
   x=3*4%5;
   printf(“x=%d”,x);
} 

The output is

Correct Answer: A

Question 3 Explanation: 
‘*’ and ‘%’ operator have the same precedence but the associativity is from left to write. So x = 3*4%5 = 12%5 = 2.
A
x=2
B
x=2.3
C
x=5
D
x=1.9
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!!