What is the output of following program?
#include <stdio.h>
int main()
{
int x = 10, *y, **z;
y = &x;
z = &y;
printf("%d %d %d", *y, **z, *(*z));
return 0;
}
Answers
Answered by
3
Code
Input
#include <stdio.h>
int main()
{
int x = 10, *y, **z;
y = &x;
z = &y;
printf("%d %d %d", *y, **z, *(*z));
return 0;
}
Output
y contains the address of x so *y print 10 then **z contains address of y of x so print the value of x 10 and 3rd *(*z) contains address of y of x that’s why print 10. So, final output is 10 10 10.
Answered by
0
ɿᵑᵖᶷᵗ
#include <stdio.h>
int main()
{
static int i=5;
if(--i){
main();
printf("%d ",i);
}
}
øᶷᵗᵖᵘᵗ
...0 0 0 0
Similar questions