//Write a programe to print reverse of a given word/string //
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main ()
{
int i,n;
char name[10];
clrscr();
printf("Enter the name\n");
scanf("%s",name);
n=strlen(name);
for(i=n-1;i>=0;i--)
{
printf("%c",name[i]);
}
getch();
}
No comments:
Post a Comment