Tuesday, 5 February 2013

Determine Palindrome String

/* Write a C program to determine if the given string is a palindrome or not */
enum Boolean{false,true};
enum Boolean IsPalindrome(char string[])
 int left,right,len=strlen(string);
 enum Boolean matched=true;
  return 0;

  /* Compare the first and last letter,second & second last & so on */
  return matched;
int main()
  char string[40];
  printf("****Program to test if the given string is a palindrome****\n");
  printf("Enter a string:");
  printf("The given string %s is a palindrome\n",string);
  printf("The given string %s is not a palindrome\n",string);
  return 0; 

No comments:

Post a Comment