//How t reverse a string and store it
#include
# include
main()
{
int i,m,n,count;
char str[10],rev_str[10];
printf("Enter a String :");
gets(str);
for(i=0;str[i]!='\0';i++)
{
}
m=i;
int y=0;
i=i-1;
for(i;i>=0;i--)
{
rev_str[y]=str[i];
y++;
}
for(i=0 ; i< m ;i++ )
printf("%c",rev_str[i]);
}
Sunday, February 15, 2009
How t reverse a string and store it
Posted by
BADTNC
at
1:28 AM
Labels: C Programming
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment