C program to print uppercase alphabets using the ASCII values
kw.c
#include <stdio.h> int main() { int i; for (i = 65; i < 91; i++) { printf("%c ", i); } printf("\n"); return 0; }
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./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 kodingwindow@kw:~$
C program to print lowercase alphabets using the ASCII values
kw.c
#include <stdio.h> int main() { int i; for (i = 97; i < 123; i++) { printf("%c ", i); } printf("\n"); return 0; }
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./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 kodingwindow@kw:~$
Comments and Reactions
What Next?
C program to reverse a given number
C program for the addition of N natural numbers
C program to convert a binary number to an equivalent decimal number
Advertisement