C Program to Convert Lowercase String to Uppercase
In this program, we will take an lower case string as input from user and convert that into upper case string.
- //C program to convert string from lowercase to upper case
- int main(){
- char str[50];
- int i;
- printf("Enter the string:");
- scanf("%s",str);
-
- for(i=0;i<=strlen(str);i++){
- if(str[i]>=97&&str[i]<=122)
- str[i]=str[i]-32;
- }
- printf("\nUpper Case String is: %s",str);
- return 0;
- }
Output

Solution not working or have any suggestions? Please send an email to [email protected]
Download Android App