Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Reverse a String Using Pointers (C99)

Description:

Write a C program that:

  • Accepts a string input from the user.
  • Reverses it using pointers.
  • Prints the reversed string.

Hints:

  • You can use two pointers, one pointing to the start and another to the end of the string.
  • Swap the characters these pointers point to, and then move the pointers toward each other (start pointer moves one position to the right, end pointer moves one position to the left) until they meet or cross each other.

Expected Outcome:

The program should display the reversed version of the input string.