C Programming :: Declarations and Initializations

8. #include
void main()
{
int x,y=2,z,a;
if(x=y%2)
z=2;
a=2;
printf("%d %d",z,x);
}

Answer: Option D

Explanation :

The value of y%2 is 0. This value is assigned to x.
The condition will if (0) so z goes uninitialized.

Post Your Answer Here:     

Reply     |    Rate This: +0 -0      |     Report     |     To Reading List



Report Error

Please Login First Click Here

Reply     |    Rate This: +0 -0      |     Report     |     To Reading List



Report Error

Please Login First Click Here