Program : Reverse String Without Using Library Function [ Strrev ]
#include<stdio.h> #include<string.h> void main() { char s[100],temp; int i,j=0; printf("n Enter the string :"); gets(s); i=0; j=strlen(s)-1; while(i<j) { temp=s[i]; s[i]=s[j]; s[j]=temp; i++; j--; } printf("nReverse string is :%s",s); getch(); }
Animation :
Incoming search terms:
- c program to reverse a string without using library functions (65)
- string operations in c without using library functions (21)
- c program to reverse a string without using string functions (14)
- how to reverse a string in c without using library function (10)
- program to reverse a string without using library function in c (9)
- reverse string program in c without using functions (9)