Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 604 Bytes

File metadata and controls

27 lines (24 loc) · 604 Bytes

Task: Reverse a String

Objective:

Write a program in C to reverse a given string. The program should take a string as input, reverse its contents, and then display the reversed string as output.

Requirements:

  1. Assume the string will not exceed 100 characters.
  2. Implement the string reversal logic without using any built-in functions like strrev. Instead, use loops and basic string manipulation.
  3. After reversing the string, print the reversed string.

Example Input and Output:

  • Input
hello
  • Output
olleh
  • Input
C programming
  • Output
gnimmargorp C