Pages
Home
Adsense Tips
Blogging Tips
SEO Tips
Wordpress
Saturday, March 1, 2014
Reverse any String
#include<stdio.h>
#include<conio.h>
main()
{
char name[10];
int i=0,j;
printf("Enter any string : ");
scanf("%[^\n]s",name);
while(name[i]!= '\0')
{
i++;
}
printf("Reverse string is : ");
for(;i>=0;i--)
{
printf("%c",name[i]);
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment