Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   function Pointer (http://www.go4expert.com/forums/function-pointer-t13109/)

ventiz 21Aug2008 02:58

function Pointer
 
Hello I'm new in C/C++ and I don't why the following structure has a pointer in the function name.

struct node *pop(struct node *p, int *value)
{
struct node *temp;
if(p==NULL)
{
printf(" The stack is empty can not pop Error\n");
exit(0);
}
*value = p->data;
temp = p;
p = p->link;
free(temp);
return(p);
}


Can someone can tell me why the pop function has a pointer.
Thank you,
Enjoy your life

aditiya 21Aug2008 13:10

Re: function Pointer
 
Bcoz Fuction Pop is returning a pointer of type struct node


All times are GMT +5.5. The time now is 07:41.