Answers for "Write a C program to find the reverse of a word without using library function."

0

Write a C program to find the reverse of a word without using library function.

#include<stdio.h>
#include<string.h>
        
void main()
{
    int i,n;
    char str[20];
    printf("Enter the String to get reversed\n");
    gets(str);
    n=strlen(str);
    printf("\nReversed string is \n");
    for(i=n-1;i>=0;i--)
    {
       printf("%c",str[i]);
    }
    
}
Posted by: Guest on September-15-2021

Code answers related to "Write a C program to find the reverse of a word without using library function."

Browse Popular Code Answers by Language