What is wrong in this function?
void stringReverse (char stringa[])
{
if (stringa[0]!='\0')
{
return stringReverse(&stringa[1]);
printf("%c", stringa[0]);
}
}
I have to write a function that invert a string (ex: "Hello" in "olleH") using recursion; the function has to receive a string (nothing else) and to print the character in the inverse order... i don't understand why what i write didn't print anything...
voidfunction returns ... well... nothing.printf()ever be reached?