1 , The pointer P you defined in the function is a local variable , so it will return NULL. in this case.
2. The same as number 1.
3. The function needs you return pointer , but you give it a string value.
The solutions is either:
char* v(char* p)
char p = " result of function v()";
} This one is better
static p="result of function v()";
} It is ok.
This post has been archived. It cannot be replied.