Let’s understand some concepts..
According to computer keyboard keys capital letter code from 65 to 90 and small letter code from 97 to 122. And their differences between them is 32. So, if you enter any alphabet key according programme it’s add and subtract about 32 from any Enter key.
- If you enter ch=’A’ then according to programme it add 32+ in code and show results=‘a’ .
- If you enter ch= ‘a’ then according to programme it subtract 32- in code and show results=‘A’.
Some important symbols used in code.
- () small bracket
- && use for ‘and’ use for address
- {} curly bracket
- “” double code
Change the alphabet from small to capital & capital to small letter.

- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- char ch;
- clrscr();
- printf(“Enter your alphabet to change the small to capital letter to capital to small letter”);
- scanf(“%c”, &ch);
- If(ch>=65&&ch<=90||ch>=97&&ch<=122||ch==’-‘ )
- {
- If(ch>=65&&ch<=90)
- {
- printf(“%c”, ch+32);
- }
- else if(ch>=97&&ch<=122)
- {
- printf(“%c”, ch-32);
- }
- else
- {
- printf(“Invalid Inputs”);
- }
- }
- getch();
- }

Inputs…
If ch=B then
Results…


