NAME:NAYAN SHAH
ROLL NO: 48
SEMISTER: 1
DEFINATION: 40. Write a program that accepts a stringin an array and
prints the reverse of the string i.e. if the stringis
abcd then it will print dcba.
--------------------------------------------------------------------------
#include<stdio.h>
#include<conio.h>
void main()
{
char a[50],b[50];
int i,j,n,totword=1,totchar=0,totline=1;
clrscr();
printf("\n Please Give The STRING : ");
scanf("%s",a);
for(j=strlen(a)-1;j>=0;j--)
printf("%c",a[j]);
getch();
}
--------------------------------- OUTPUT ---------------------------------
Please Give The STRING : SYNTAX
XATNYS
--------------------------------------------------------------------------