Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Returning *char problem (http://www.go4expert.com/forums/returning-char-problem-t9909/)

danguba 10Apr2008 17:24

Returning *char problem
Hello everybody... I'm new here. I have strange problem. My code look something like this

char* point(transform z){
char *a;
//here goes some code where a gates some content
return a;
void main()
// here goes some declarations that doesn't affect this problem
char *p=point(y);
printf(" %s ", p);

so first printf (where i print a) give good result but the second (where I print p) just write some strange symbol. I don't see any mistake in my code. Can anyone help?

All times are GMT +5.5. The time now is 02:18.