It is possible to return a String from a function?
If yes, how?
I'am trying to return a full string from this function:
But this dont work... he just returns 1 char, not all the string.Code:char substr(char *str, int start, int end)
{
int i,j;
char strCp[100];
for(i = start, j = 0; i <= end; i++,j++)
strCp[j] = str[i];
strCp[j] = '\0';
return *strCp;
}