Jan 18 2006 08:28 AM 240984 91 Write a C program to reverse the string without using strrev() function? vigneshwaran Read Best Answer Editorial / Best Answer Rohan Profile Answers by Rohan Questions by Rohan Member Since Nov-2005 | Feb 18th, 2006 #include <stdio.h>#include <conio.h>#include <string.h>void main(){ char *str; int i,len; //not using any temp variable and assume we can use only string array and length printf("Enter String : "); scanf("%s",str); len=strlen(str)-1; for(i=0;i<strlen(str)/2;i++) { str[i]+=str[len]; str[len]=str[i]-str[len]; str[i]=str[i]-str[len--]; } printf("Reverse String is : %s",str); getch();} naveen Jun 17th, 2017 Code#include<stdio.h> #include<conio.h> #include<string.h> void main() { char str[10],temp; int i,len; printf("enter string: "); scanf("%s",str); len=strlen(str)-1; for(i=0;i<strlen(str)/2;i++) { temp=str[i]; str[i]=str[len]; str[len--]=temp; } printf("reverse string : %s" ,str); getch(); } Gurjyot Singh Dec 5th, 2016 Here`s the answer Code#include<stdio.h> #include<conio.h> #include<string.h> int main() { char A[20]; int i;int C=0; printf("Enter String : "); gets(A); for(i=0;A[i]!=
Jan 18 2006 08:28 AM 240984 91 Write a C program to reverse the string without using strrev() function? vigneshwaran Read Best Answer Editorial / Best Answer Rohan Profile Answers by Rohan Questions by Rohan Member Since Nov-2005 | Feb 18th, 2006 #include <stdio.h>#include <conio.h>#include <string.h>void main(){ char *str; int i,len; //not using any temp variable and assume we can use only string array and length printf("Enter String : "); scanf("%s",str); len=strlen(str)-1; for(i=0;i<strlen(str)/2;i++) { str[i]+=str[len]; str[len]=str[i]-str[len]; str[i]=str[i]-str[len--]; } printf("Reverse String is : %s",str); getch();} naveen Jun 17th, 2017 Code#include<stdio.h> #include<conio.h> #include<string.h> void main() { char str[10],temp; int i,len; printf("enter string: "); scanf("%s",str); len=strlen(str)-1; for(i=0;i<strlen(str)/2;i++) { temp=str[i]; str[i]=str[len]; str[len--]=temp; } printf("reverse string : %s" ,str); getch(); } Gurjyot Singh Dec 5th, 2016 Here`s the answer Code#include<stdio.h> #include<conio.h> #include<string.h> int main() { char A[20]; int i;int C=0; printf("Enter String : "); gets(A); for(i=0;A[i]!=
naveen Jun 17th, 2017 Code#include<stdio.h> #include<conio.h> #include<string.h> void main() { char str[10],temp; int i,len; printf("enter string: "); scanf("%s",str); len=strlen(str)-1; for(i=0;i<strlen(str)/2;i++) { temp=str[i]; str[i]=str[len]; str[len--]=temp; } printf("reverse string : %s" ,str); getch(); }
Gurjyot Singh Dec 5th, 2016 Here`s the answer Code#include<stdio.h> #include<conio.h> #include<string.h> int main() { char A[20]; int i;int C=0; printf("Enter String : "); gets(A); for(i=0;A[i]!=