Posts

Showing posts from September 27, 2012

REVERSING A STRING

LIST OF PROGRAMS
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s[20],s2[20];
int d=0;
clrscr();
printf("ENTER STRING\n");
gets(s);
strcpy(s2,s);
strrev(s);
d=strcmp(s,s2);
if(d==0)
printf("PALLINDROME");
else
printf("NOT A PALLINDROME");
getch();
}

LIST OF PROGRAMS