Reversing a String
Implementation of reversing a string without using library function.
Procedure :
Calculate the length of string if it isn't given as input.
Initialise i with 0 and j with length - 1.
Run a for loop till i < j.
Swap the i-th and j-th character in each iteration.
C Function :
Contributed by Nitin Ranganath
Last updated