Having a little problem..
I need to return a string from a function..
Here is my data...
char returnsting(char result[])
{
result[]="STRNG";
return(???);
}
I want to return my string...
How can I do that?
Printable View
Having a little problem..
I need to return a string from a function..
Here is my data...
char returnsting(char result[])
{
result[]="STRNG";
return(???);
}
I want to return my string...
How can I do that?
Use strcpy to copy strings:
Code:char returnsting(char *result)
{
if(result != NULL)
strcpy(result, "STRNG");
return result
}