?
What will be the output of the following program code?
What will be the output of the following program code?
#include <stdio.h>
void main()
{
int i=3, *j, **k;
j = &i;
k = &j;
printf("%d%d%d", *j, **k, *(*k));
}
#include <stdio.h>
void main()
{
int i=3, *j, **k;
j = &i;
k = &j;
printf("%d%d%d", *j, **k, *(*k));
}
Join the Discussion
Login to post a comment or share your explanation.
Loginj=&i ; i.e. j=1000 i.e. *j = *(1000) --> *j=(3);
k=&j i.e. k=2000 i.e. *k = *(2000)
*k = *(1000)
*k = (3);
Hence Output is i=3 , j=3 ,k=3.
**k means *j and *j mean i.
aur *(*k)means*j and *j means I
then,
333 ans
*j means i