prev | ASCII value 38. Convert Lowercase to uppercase (16.7.2009) /* Program# 38 date : 25-12-2008 Convert Lowercase to uppercase */ #include <stdio.h> main(){ char a; printf("\nEnter a lowercase alphabet :"); scanf("%c",&a); if(a>=97 && a<=122){ a=a-32; printf("\nuppercase letter is %c \n",a); } else printf("\n%c is Not Lowercase letter\n",a); } output: To compile the program, run the gcc command, $ gcc p38.c Now the executable file is stored as a.out, to run the program, $ ./a.out Enter a lowercase alphabet :h uppercase letter is H $ |
next |