C Programming Code Examples C > For Loops and While Loops Code Examples program to print alphabets from a to z program to print alphabets from a to z Write a C program to print alphabets from a to z using for loop. How to print alphabets using loop in C programming. Logic to print alphabets from a to z using for loop in C programming. Logic to print alphabets from a to z Printing alphabets in C, is little trick. If you are good at basic data types and literals then this is an easy drill for you. Internally C represent every character using ASCII character code. ASCII is a fixed integer value for each global printable or non-printable characters. For example - ASCII value of a=97, b=98, A=65 etc. Therefore, you can treat characters in C as integer and can perform all basic arithmetic operations on character. Declare a character variable, say ch. Initialize loop counter variable from ch = 'a', that goes till ch <= 'z', increment the loop by 1 in each iteration. The loop structure should look like for(ch='a'; ch<='z'; ch++). Inside the loop body print the value of ch. #include <stdio.h> int main() { char ch; printf("Alphabets from a - z are: \n"); for(ch='a'; ch<='z'; ch++) { printf("%c\n", ch); } return 0; }