Reversing String

Program for reversing string in C :

ALGORITHM:

    1. INPUT string, str[100]
    2. Calculate length of string and store as len
    3. for i=0 to len>0
      SET rev[i] = str[len-i-1]
    4. SET rev[len]=”
    5. PRINT reversed string rev[100]

C SOURCE CODE

Leave a Reply

Your email address will not be published. Required fields are marked *