Is it possible for a function to return a string,an array of characters to the calling function?
i mean something like
if not,please tell me how is this possible?
If you are going to use char* or string& or string* as the return type for a function, then please be very careful that you do not try to return the address of a local variable, because as soon as you return from the function, it will cease to exist, and you will end up with garbage. And make sure you free any allocated space for the string when you are done using it.