C Exercises: Print a string in reverse order
22. Print String in Reverse Using Pointer
Write a program in C to print a string in reverse using a pointer.
Sample Solution:
C Code:
Sample Output:
Pointer : Print a string in reverse order : ------------------------------------------------ Input a string : w3resource Reverse of the string is : ecruoser3w
Flowchart:

For more Practice: Solve these Related Problems:
- Write a C program to reverse a string in place using pointer swapping without using extra memory.
- Write a C program to print a string in reverse using recursion and pointer arithmetic.
- Write a C program to reverse a string and then compare it with the original to check if it’s a palindrome.
- Write a C program to input a string, reverse it using a pointer, and then output both the original and reversed strings.
C Programming Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a program in C to print all the alphabets using pointer.
Next: C Linked List Exercises Home
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.