
Originally Posted by
laserlight
I can of course tell you the answer right now, but this kind of exploration will help you get a stronger grounding in the concepts and syntax than just a quick reply from a community member.
I have written following code Just for doing experiment I have explain all with comments
Code:
#include<stdio.h>
// function F get content of Y pointer and return pointer P to function
int *F (int *P)
{
printf("P = %p \n", P); // Print content of pointer Y
++P; // increment pointer value
return P; // return pointer P
}
int main ()
{
int *Y; // Decleare pointer to integer
printf("Y = %p\n", Y); // Print content of pointer Y
Y = F (Y); // call function F and pass content of Y
printf("Y = %p\n", Y); // print content of Y after calling function
return 0;
}
Y = 00400080
P = 00400080
Y = 00400084