HOME

Monday, March 16, 2015

C PROGRAM TO COUNT THE NUMBER OF LETTER PRESENT IN WORD, FIND THE REVERSE OF WORD & CHECK PALINDROME OR NOT. AND DISPLAY THE CONCATENATE BETWEEN FIRST AND TWO WORD


#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
    char word[20],word1[20],word2[20];
    int n;
    printf("enter the first word\n");
    scanf("%s",word);
    printf("enter the second word\n");
    scanf("%s",word2);
    n=strlen(word);
    strcpy(word1,word);
    printf("the number of letter present in %s is %d\n",word,n);
    printf("the reverse is %s\n",strrev(word1));
    if(strcmp(word,word1)==0)
    {
        printf("%s is palindrome word\n",word);
    }
    else
    {
        printf("%s is not palindrome word\n",word);
    }
    printf("the concatenate of first and second word is %s \n",strcat(word,word2));
    }

FOR MORE PROGRAM CLICK HERE

No comments:

Post a Comment