How to print alphabet in c uppercase and lowercase | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to print alphabet in c uppercase and lowercase

10th Jan 2017, 2:43 PM
Piyush Bansode
Piyush Bansode - avatar
4 Answers
+ 1
here it goes char i, j; for(i='A';i<='Z';i++) //uppercase { printf("%c", i) ; } for(i='a';i<='z';i++) //lowercase { printf("%c", i) ; }
10th Jan 2017, 3:02 PM
Rishabh Agrawal
Rishabh Agrawal - avatar
+ 1
sorry for that it was my mistake. thanks.
10th Jan 2017, 3:34 PM
Rishabh Agrawal
Rishabh Agrawal - avatar
0
but why you have taken j
10th Jan 2017, 3:16 PM
Piyush Bansode
Piyush Bansode - avatar
0
// Prints the alphabet in format "Aa - Zz" for (char ch = 'a'; ch <= 'z'; ch++) { printf("%c%c", (ch ^ 0x20), ch); // using bit flips to get the uppercase }
10th Jan 2017, 4:46 PM
Boris Batinkov
Boris Batinkov - avatar