C Examples Reverse Sentence Recursion
# C Programming Example - String Reversal
[ C Programming Example](#)
Use recursion to reverse a string.
## Example - String Reversal
#includevoid reverseSentence(); int main(){printf("Enter a string: "); reverseSentence(); return 0; }void reverseSentence(){char c; scanf("%c", &c); if(c != 'n'){reverseSentence(); printf("%c",c); }}
Output:
Enter a string: tutorial boonur
[ C Programming Example](#)
YouTip