adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

program in c to convert case of a given string.

program in c to convert case of a given string.



#include<stdio.h>
#include<conio.h>
#include<string.h>
  void  main()
   {
    char str[20],i;
    printf("Enter a string :-");
    gets(str);
    printf("The converted sentence is ");
    for(i=0;str[i]!='\0';i++)
     {
      if(str[i]>='A'&&str[i]<='Z')
         printf("%c",str[i]+32);
      else 
         printf("%c",str[i]-32);
       }
   getch();
   }
Output:-





Post a Comment

1 Comments

Biswajit Das said…
Convert your text to Sentence Case. Then go for Flox sentence case converter.