ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

Home » C solved programs » C looping programs

C program to print all uppercase and lowercase alphabets

In this C program, we are going to print all uppercase alphabets (from 'A' to 'Z') and lowercase alphabets (from 'a' to 'z').

To print uppercase alphabets, we are using a for loop from 'A' to 'Z' and printing the characters, and to print lowercase alphabets, we are using a another for loop from 'a' to 'z' and printing the characters.

Print Alphabets in Upper and Lower case using C program



/*C program to print all upper case and lower case alphabets.*/
 
#include <stdio.h>
 
int main()
{
    char i;
 
    printf("Capital (upper) case characters:\n");
    for(i='A'; i<='Z'; i++)
        printf("%c ",i);
 
    printf("\n\nLower case characters:\n");
    for(i='a'; i<='z'; i++)
        printf("%c ",i);
     
    return 0;
}

Output

    Capital (upper) case 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
    
    Lower case 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
ADVERTISEMENT
ADVERTISEMENT




Comments and Discussions

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.