C program to print uppercase alphabets using the ASCII values
codeaft.c
#include <stdio.h> int main() { int i; for (i = 65; i < 91; i++) { printf("%c ", i); } printf("\n"); return 0; }
Output
codeaft@codeaft:~$ gcc codeaft.c
codeaft@codeaft:~$ ./a.out 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 codeaft@codeaft:~$
C program to print lowercase alphabets using the ASCII values
codeaft.c
#include <stdio.h> int main() { int i; for (i = 97; i < 123; i++) { printf("%c ", i); } printf("\n"); return 0; }
Output
codeaft@codeaft:~$ gcc codeaft.c
codeaft@codeaft:~$ ./a.out 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 codeaft@codeaft:~$
Comments and Reactions