View Single Post
Old Jul 13th, 2005, 4:39 AM   #4
proghelper
Newbie
 
Join Date: Jun 2005
Posts: 16
Rep Power: 0 proghelper is on a distinguished road
YEs I think you are correct on this except for a single mistake:

char * getbuf(char *test){
static char temp[10];
//do something on temp;
test=temp;
return temp;
}

Using this in main() program:

char* a;
char* b;
a = getbuf(b);

Now if you print both a and b, they will result in the same value.



-------
http://www.programminghelp4u.com - Programming (Assignment/Project) Help
proghelper is offline   Reply With Quote