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.
In this post we are going to write a simple C program to print alphabets, both Capital letter alphabets and Small letter alphabets.
It’s not so complicated as you would have imagined. Let’s see the code:
Program
#include<stdio.h> int main(){ char i; printf("Small Letters:\n"); //print small letters alphabets for(i = 'a'; i <='z'; i++){ printf("%c", i); } printf("\n\nCapital Letters:\n"); //print captial letters alphabets for(i = 'A'; i <='Z'; i++){ printf("%c", i); } return(0); }
Out Put
Small Letters: abcdefghijklmnopqrstuvwxyz Capital Letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ -------------------------------- Process exited after 0.04023 seconds with return value 0 Press any key to continue . . .
- Write a c program to subtract two numbers.
- Write a c program to add two numbers.
- Write a c program to swap two numbers.
- Write a c program to check even or odd
- Write a c program to print alphabets from a to z
- Write a c program print 1 to 100
- Hello World Example
- C Program
- Why Use C?
- Facts about C
- C PROGRAM OVERVIEW