Learn C
Coading is not typing it is imagination......
Sunday, July 26, 2015
String_reverse_word
#include<stdio.h>
#include<string.h>
/***
///reverse a word
int main()
{
int i,count=0;
char ch[20];
printf("Enter the string:");
gets(ch);
for(i=0; ch[i]!='\0'; i++)
{
count++;
}
printf("Reverse is:");
for(i=count-1; i>=0; i--)
{
printf("%c",ch[i]);
}
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment