v behaviorurldefaultvmlo behaviorurldefaultvmlw


void main()

{

          int i,j,len=0,word=1,lens=0,ll=1;

          char str[100];

          clrscr();

          printf("ENTER THE STRING: ");

          gets(str);

          for(i=0;str[i]!='\0';i++)

          {

              len++;

                   if(str[i]==' ')

                          word++;

                   else

                         lens++;

          }

          printf("CHARACTERS WITH SPACE : %d\n",len);

          printf("CHARACTERS WITHOUT SPACE : %d",lens);

          printf("\n                    WORDS : %d",word);

          getch();

}


OUTPUT :

ENTER THE STRING: KAMLESH MENGAR

       CHARACTERS WITH SPACE : 14

CHARACTERS WITHOUT SPACE : 13

                                          WORDS : 2


Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: v behaviorurldefaultvmlo behaviorurldefaultvmlw
Reference No:- TGS0159307

Expected delivery within 24 Hours