C output type question

Q.  Trace the output.

void main()
{
int x=-5,y,num=5;
y=x%-4;
y=(y?0:num*num);
printf("%d",y);
}

- Published on 17 Jun 15

a. 0
b. 25
c. -25
d. None of the above.

ANSWER: 0

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)