167. C Program to Convert Lowercase Text into Uppercase Text.
How does this program work?
- This Program is used to convert lowercase text into uppercase text.
Here is the code
#include <string.h>
int main()
{
char str[20];
int i;
printf("Enter your String \n");
scanf("%s",str);
for(i=0;i<=strlen(str);i++)
{
if(str[i]>=97 && str[i]<=122 )
{
str[i]=str[i]-32;
}
}
printf("\n String in Uppercase = %s",str);
}