Write a program in C to covert small letter to capital letter.
#include<stdio.h> #include<conio.h> void main() { char ch; clrscr(); printf("Enter a lower case alphabet:-"); scanf("%c",&ch); ch=ch-32; printf("Capital alphabet=%c",ch); getch(); }
Output:-
Write a program in C to covert capital letter to small letter.
#include<stdio.h> #include<conio.h> void main() { char ch; clrscr(); printf("Enter a upper case alphabet:-"); scanf("%c",&ch); ch=ch+32; printf("Lower case alphabet=%c",ch); getch(); }
Output:-
0 Comments