Sail E0 Webinar
Question


What will be the output of the program ?


#include<stdio.h>
int main()
{
int x=30, *y, *z;
y=&x; /* Assume address of x is 500 and integer is 4 byte size */
z=y;
*y++=*z++;
x++;
printf("x=%d, y=%d, z=%d\n", x, y, z);
return 0;
}
Options:
A .  x=31, y=502, z=502
B .  x=31, y=500, z=500
C .  x=31, y=498, z=498
D .  x=31, y=504, z=504
Answer: Option D

No answer description available for this question. 



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers