Showing posts with label SOLVING PROBLEMS USING STRING FUNCTIONS. Show all posts
Showing posts with label SOLVING PROBLEMS USING STRING FUNCTIONS. Show all posts

Wednesday, January 21, 2015

SOLVING PROBLEMS USING STRING FUNCTIONS

PROGRAM:

#include<stdio.h> #include<string.h>

main()
{

char s[20],s1[20]; printf("Enter a String\n"); scanf("%s",s); strcpy(s1,s); if(strcmp(s,s1)==0)

printf("The Given String is Palindrome\n");
else

printf("The Given String is Not Palindrome\n");
}

OUTPUT:

Enter a String madam

The Given String is Palindrome