Convert String from lowercase to uppercase in C CPP Java Python

int main(){
char str[25];
int i;
printf("Enter the string:");
/* running the loop from 0 to the length of the string
* to convert each individual char of string to uppercase
* by subtracting 32 from the ASCII value of each char
/* Here we are performing a check so that only lowercase
* characters gets converted into uppercase.
* ASCII value of a to z(lowercase chars) ranges from 97 to 122
printf("\nUpper Case String is: %s",str);
return 0;
Last updated on by vishal devxo