C Program to Display Characters from A to Z Using Loop

To understand this example, you should have the knowledge of the following C programming topics:


Program to Print English Alphabets

Output

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

In this program, the for loop is used to display the English alphabet in uppercase.

Here's a little modification of the above program. The program displays the English alphabet in either uppercase or lowercase depending upon the input given by the user.


Print Lowercase/Uppercase alphabets

Output

Enter u to display uppercase alphabets. 
Enter l to display lowercase alphabets. l
a b c d e f g h i j k l m n o p q r s t u v w x y z