String Manipulation

Sample C program to demonstrate various string manipulation functions

  1. #include <stdio.h>
  2. "Computer""\n\t String Manipulation""\n\t *******************""\n\n Strlen""\n ******""\n The length of the string %s is %d ""\n\n Strcpy""\n ******""\n The source strings is %s\n""\n The target string is %s\n""\n\n Strcmp""\n ******""\n The strings are %s and %s\n They are equal ""\n The strings are %s and science are equal""science""\n The string %s and science are equal\n""\n The string %s and science are not equal \n""\n\n Palindrome checking""\n *******************""\n The string %s is a palindrome""\n The string %s is not a palindrome""window""\n The string window is a palindrome""\n The string window is not a palindrome"'\0''\0')
  3. {
  4. *ts = *ss;
  5. ss++;
  6. ts++;
  7. }
  8. *ts='\0''\0'