YouTip LogoYouTip

C Examples Reverse Sentence Recursion

# C Programming Example - String Reversal [![Image 3: C Programming Example](#) 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 [![Image 4: C Programming Example](#) C Programming Example](#)
← C Examples Array Largest ElemeC Examples Octal Decimal Conve β†’