Example C program to convert lower case into upper case and vice versa:
Below C program is used to convert lower case into upper case. strupr() function is a non standard function. So, all compilers may not support.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include<stdio.h> #include<string.h> int main() { char str[ ] = "Modify This String To Upper"; printf("%s\n",strupr(str)); return 0; } |
Output:
MODIFY THIS STRING TO UPPER
Below C program is used to convert upper case into lower case. strlwr() function is also a non standard function. So, all compilers may not support.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include<stdio.h> #include<string.h> int main() { char str[ ] = "MODIFY This String To LOwer"; printf("%s\n",strlwr (str)); return 0; } |
Output:
modify this string to lower