C Program to Display Characters from A to Z using loop
ADVERTISEMENTS
C program to display characters from a to z using loop. In this article, you will learn how to display characters from a to z using loop in c language.
Alphabetic characters from A to Z
A B C D ......... W X Y Z
Source Code
// C Program to Display Characters from A to Z using loop
#include <stdio.h>
int main() {
char c;
printf("Capital characters : ");
for (c = 'A'; c <= 'Z'; c++)
printf("%c ", c);
printf("\n\nSmall characters : ");
for (c = 'a'; c <= 'z'; c++)
printf("%c ", c);
printf("\n");
return 0;
}
Output
Capital characters : 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
Small characters : 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