Alphabet Pattern

C program to display alphabet pattern

C program to display alphabet pattern

In this tutorial, we will discuss the concept of C program to display the alphabet pattern.

In this post, we will display ten alphabet patterns program and explain how to print using for loop

Pattern programs

Program 1

C Program Alphabet Pattern 1

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 1\n");
    int i,j;
    for(i=1; i<=5; i++){
        for(j=1; j<=i; j++){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 1

A
BB
CCC
DDDD
EEEEE

 

Program 2

C Program Alphabet Pattern 2

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 2\n\n");
    int i,j;
    for(i=1; i<=5; i++){
        for(j=5; j>=i; j--){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 2

AAAAA
BBBB
CCC
DD
E

 

Program 3

C Program Alphabet Pattern 3

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 3\n\n");
    int i,j;
    for(i=1; i<=5; i++){
        for(j=1; j<=i; j++){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 3

A
AB
ABC
ABCD
ABCDE

 

Program 4

C Program Alphabet Pattern 4

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 4\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=i; j<=6; j++){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 4

E
EF
DEF
CDEF
BCDEF
ABCDEF

 

Program 5

C Program Alphabet Pattern 5

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 5\n\n");
    int i,j;
    for(i=1; i<=6; i++){
        for(j=i; j>=1; j--){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 5
A
BA
CBA
DCBA
EDCBA
FEDCBA

 

Program 6

C Program Alphabet Pattern 6

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 5\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=6; j>=i; j--){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 6

F
FE
FED
FEDC
FEDCB
FEDCBA

 

Program 7

C Program Alphabet Pattern 7

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 5\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=1; j<=i; j++){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 7

FFFFFF
EEEEE
DDDD
CCC
BB
A

 

Program 8

C Program Alphabet Pattern 8

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 8\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=6; j>=i; j--){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 8

F
EE
DDD
CCCC
BBBBB
AAAAAA

 

Program 9

C Program Alphabet Pattern 9

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 8\n\n");
    int i,j;
    for(i=1; i<=6; i++){
        for(j=6; j>=i; j--){
        printf("%c",'A'-1+j);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphaber pattern 9

FEDCBA
FEDCB
FEDC
FED
FD
F

 

Program 10

C Program Alphabet Pattern  10

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 10\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=i; j>=1; j--){
        printf("%c",'A'-1+j);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 10

FEDCBA
EDCBA
DCBA
CBA
BA
A

 

Similar post

Java program to print star pyramid pattern 

C program to print star pyramid pattern 

C++ program to print star pyramid pattern 

Python program to print star pyramid pattern 

Floyd’s triangle number pattern using for loop in C

Floyd’s triangle pattern using nested for loop in Java

Floyd’s triangle pattern using nested while loop in Java

Hollow pyramid triangle pattern in C++ language

Rhombus pattern in Java using for loop

Rhombus pattern in C using while loop

Rhombus pattern in C++ using do-while loop

 

Suggested for you

For loop in Java language

For loop in C++ language

For loop in C language

For loop in Python language

 

While loop in Java language

While loop in C language

While loop in C++ language

While loop in Python language

 

Do-while loop in Java language

Do-while loop in C language

Do-while loop in C++ language

 

Nested for loop in Java language

Nested for loop in C++ language

Nested for loop in C language

Nested for loop in Python language

 

Operator in C++ language

 

Reverse number pattern in Cpp using while loop
Java program to display triangle alphabet pattern
Karmehavannan

I am Mr S.Karmehavannan. Founder and CEO of this website. This website specially designed for the programming learners and very especially programming beginners, this website will gradually lead the learners to develop their programming skill.

Recent Posts

How to find reverse number using method in Java

How to find reverse number using method In this article, we will discuss the concept…

2 days ago

C# inverted full pyramid star pattern

C# inverted full pyramid star pattern In this article, we will discuss the concept of…

3 weeks ago

C# Full Pyramid star pattern program

C# Full Pyramid star pattern program In this article, we will discuss the concept of…

1 month ago

Program to count vowels,consonants,words, characters and space in Java

Program to count vowels, consonants, words, characters and space in Java In this article, we…

1 month ago

How to print multiplication table using Array in C++ language

How to print multiplication table using Array in C++ language In this post, we will…

1 month ago

C Program to multiplication table using Array

C Program to multiplication table using Array In this tutorial , we will discuss about…

2 months ago