if you have something like this how can you print the string in main??
Code:/#include <stdio.h> #include <stdlib.h> void myf(char *p) { p="balls"; } int main() { int i=0,j; char ch[10]; myf(ch); for(i=0;i<10;i++) printf("%c",ch[i]); printf("\n"); system("PAUSE"); return 0; }