P
prashant.khade1623
main()
{
int *ptr;
int *p;
p=ptr;
int i;
ptr = malloc (10);
for (i =0;i<10;i++)
ptr[i++] = 2;
for (i =0;i<10;i++)
printf("%d\n",p);
}
the output is something like this
0
4096
132617
-1075507061
4
12643904
3
100
0
2
{
int *ptr;
int *p;
p=ptr;
int i;
ptr = malloc (10);
for (i =0;i<10;i++)
ptr[i++] = 2;
for (i =0;i<10;i++)
printf("%d\n",p);
}
the output is something like this
0
4096
132617
-1075507061
4
12643904
3
100
0
2