I want to return a character array from a function. Then I want to print it in main. how can I get the character array back in main function?
main
Daniel is right: http://ideone.com/kgbo1C#view_edit_box
Change
test=substring(i,j,*s);
to
test=substring(i,j,s);
Also, you need to forward declare substring:
char *substring(int i,int j,char *ch); int main // ...