...
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

Leave a Reply

Your email address will not be published. Required fields are marked *