C Programs to print Alphabet Pattern | alphabet pattern programs in c

Introduction

Pattern printing in C Programming Language is always a favorite topic for all new c programmers. It mainly focuses on outer & inner loops. In this article, I have explained the list of all alphabet pattern programs in c programming language. I have used Code::Blocks IDE for debugging purpose. But you can use any C programming language compiler as per your availability.

Alphabet Pattern programs in C using for loop

C Programs to print Alphabet Pattern
C Programs to print Alphabet Pattern

C Language Alphabet pattern 1

A
BB
CCC
DDDD
EEEEE
#include<stdio.h>
void main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%c",'A'-1 + i);
        }
        printf("\n");
    }
}

C Language Alphabet pattern 2

AAAAA
BBBB
CCC
DD
E
#include<stdio.h>
void main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
        for(j=5;j>=i;j--)
        {
            printf("%c",'A'-1 + i);
        }
        printf("\n");
    }
}

C Language Alphabet pattern 3

A
AB
ABC
ABCD
ABCDE
#include <stdio.h>
int main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%c",'A' + j-1);
        }
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 4

E
DE
CDE
BCDE
ABCDE
#include <stdio.h>
int main()
{
    int i, j;
    for(i=5;i>=1;i--)
    {
        for(j=i;j<=5;j++)
        {
            printf("%c",'A' + j-1);
        }
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 5

A
BA
CBA
DCBA
EDCBA
#include <stdio.h> 
int main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
        for(j=i;j>=1;j--)
        {
            printf("%c",'A' + j-1);
        }
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 6

E
ED
EDC
EDCB
EDCBA
#include <stdio.h>
int main()
{
    int i, j;
    for(i=5;i>=1;i--)
    {
        for(j=5;j>=i;j--)
        {
            printf("%c",'A' + j-1);
        }
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 7

E
DD
CCC
BBBB
AAAAA
#include <stdio.h>
int main()
{
    int i, j;
    for(i=5;i>=1;i--)
    {
        for(j=5;j>=i;j--)
        {
            printf("%c",'A'-1 + i);
        }
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 8

EEEEE
DDDD
CCC
BB
A
#include <stdio.h> 
int main()
{
    int i, j;
    for(i=5;i>=1;i--)
    {
        for(j=1;j<=i;j++)
        {
            printf("%c",'A'-1 + i);
        }
        printf("\n");
    }
    return 0;
}

Alphabet pattern 9

EDCBA
EDCB
EDC
ED
E
#include <stdio.h> 
int main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
        for(j=5;j>=i;j--)
        {
            printf("%c",'A'-1 + j);
        }
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 10

EDCBA
DCBA
CBA
BA
A
#include <stdio.h> 
int main()
{
    int i, j;
    for(i=5;i>=1;i--)
    {
        for(j=i;j>=1;j--)
        {
            printf("%c",'A'-1 + j);
        }
        printf("\n");
    }
   return 0;
}

C Language Alphabet pattern 11

          A
       ABA
    ABCBA
  ABCDCBA
ABCDEDCBA
#include<stdio.h> 
void main()
{
    int ch=65;
    int i,j,k,m;
    for(i=1;i<=5;i++)
    {
       for(j=5;j>=i;j--)
       printf(" ");
       for(k=1;k<=i;k++)
       printf("%c",ch++);
       ch--;
       for(m=1;m<i;m++)
       printf("%c",--ch);
       printf("\n");
       ch=65;
    }
}

C Language Alphabet pattern 12

I
IN
IND
INDI
INDIA
#include<stdio.h> 
void main()
{
    char s[]="INDIA";
    int i,j;
    for(i=0;s[i];i++)
    {
        for(j=0;j<=i;j++)
        printf("%c",s[j]);
        printf("\n");
    }
}

C Language Alphabet pattern 13

1A2B3C4D5E
1A2B3C4D
1A2B3C
1A2B
1A
#include <stdio.h> 
int main()
{
    int i,j,k;
    for(i=5; i>=1; i--)
    {
        for(j=1, k='A'; j<=i; j++,k++)
        {
            printf("%d%c",j,k);
        }
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 14

         A
       BAB
     CBABC
  DCBABCD
EDCBABCDE
#include <stdio.h> 
int main()
{
    int i,j;
    char CH='A';
    int space=4;
    for(i=1; i<=5; i++)
    {
        for(j=1; j<=space; j++)
            printf(" ");
        //first part of the row
        for(j=CH; j>='A'; j--)
            printf("%c",j);
        //second part of the row
        for(j='B'; j<=CH; j++)
            printf("%c",j);
        printf("\n");
        CH++;
        space--;
    }
    return 0;
}

C Language Alphabet pattern 15

ABCDEFGFEDCBA
ABCDEF   FEDCBA
ABCDE        EDCBA
ABCD             DCBA
ABC                   CBA
AB                        BA
A                             A
#include<stdio.h>
int main()
{
    int i,j,k,l,m;
    for(i=0;i<=6;i++)
    {
        for(k=65;k<=71-i;k++)
            printf("%c",k);
        for(j=1;j<=i*2-1;j++)
            printf(" ");
        for(l=71-i;l>=65;l--)
            if(l!=71)
                printf("%c",l);
        printf("\n");
    }
    return 0;
}

C Language Alphabet pattern 16

A 
BC 
DEF 
GHIJ 
KLMNO
#include <stdio.h>
int main()
{
    int i,j;
    char ch='A';
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%c ",ch++);
        }
        printf("\n");
    }
    return 0;
}

Alphabet pattern 17

           A
        BAB
     CBABC
   DCBABCD
EDCBABCDE
#include<stdio.h> 
void main()
{
        int i,n=5,j;
        for(i=1;i<=n;i++)
        {
            for(j=1;j<=n-i;j++)
            {
                printf("  ");
            }
            for(j=i;j>0;j--)
            {
                printf(" %c",(char)(j+64));
            }
            for(j=2;j<=i;j++)
            {
                printf(" %c",(char)(j+64));
            }
            printf("\n");
        }
}

C Language Alphabet pattern 18

A
BF
CGJ
DHKM
EILNO
#include<stdio.h>
void main()
{
    int i,j,diff,value,n=5;
    for(i=1;i<=n;i++)
    {
        diff=n-1;
        value=i;
        for(j=1; j<=i; j++)
        {
            printf("%4c",(char)(value+64));
            value=value+diff;
            diff--;
        }
        printf("\n");
    }
}

C Language Alphabet pattern 19

A
ABC
ABCDE
ABCDEFG
ABCDEFGI
#include<stdio.h> 
void main()
{
    int i,j,n=5;
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=(i*2-1);j++)
        {
            printf("%c",(char)(j+64));
        }
        printf("\n");
    }
}

C Language Alphabet pattern 20

EFGHI
DEFG
CDE
BC
A
#include<stdio.h> 
void main()
{
    int i,j,k,n=5;
    for(i=n;i>=1;i--)
    {
        k = i;
        for(j=1;j<=i;j++,k++)
        {
            printf("%c",(char)(k+64));
        }
         printf("\n");
    }
}

C Language Alphabet pattern 21

ABCDE
BCDE
CDE
DE
E
#include<stdio.h> 
void main()
{
    int i,j,n=5;
    for(i=1;i<=n;i++)
    {
        for(j=i;j<=n;j++)
        {
            printf("%c",(char)(j+64));
        }
        printf("\n");
    }
}

C Language Alphabet pattern 22

          A
        BB
     CCC
 DDDD
EEEEE
#include<stdio.h> 
void main()
{
    int i,j,k,n=5;
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n-i;j++)
        {
            printf(" ");
        }
        for(k=1;k<=i;k++)
        {
            printf("%c",(char)(i+64));
        }
        printf("\n");
    }
}

C Language Alphabet pattern 23

            A
         ABA
      ABCBA
    ABCDCBA
  ABCDEDCBA
#include<stdio.h> 
void main()
{
        int i,n,j;
        for(i=1;i<=5;i++)
        {
            for(j=1;j<=5-i;j++)
            {
                printf(" ");
            }
            for(j=1;j<=i;j++)
            {
                printf("%c",(char)(j+64));
            }
            for(j=i-1;j>=1;j--)
            {
                printf("%c",(char)(j+64));
            }
            printf("\n");
        }
}

C Language Alphabet pattern 24

a
Bc
DeF
gHiJ
kLmNo
#include<stdio.h>
void main()
{
    int i, j, k = 0, l = 1, n = 5;
    for (i = 1; i <= n; i++)
    {
        for (j = 1; j <= i; j++, k++, l++)
        {
            if (k % 2 == 0)
            {
                printf("%4c", (char)(l + 96));
            }
            else
            {
                printf("%4c", (char)(l + 64));
            }
        }
        printf("\n");
    }
}

C Language Alphabet pattern 25

*
*A*
*A*A*
*A*A*A*
#include<stdio.h>
void main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
    for(j=1;j<=i;j++)
    {
        if(j%2==0) printf("A");
        else printf("*");
    }
    printf("\n");
    }
}

C Language Alphabet pattern 26

AAAAA
BBBBB
CCCCC
DDDDD
EEEEE
#include<stdio.h>
void main() {
  char i, j;
  for (i = 'A'; i <= 'E'; i++) {
    for (j = 'A'; j <= 'E'; j++) {
      printf("%c", i);
    }
    printf("\n");
  }
}

C Language Alphabet pattern 27

ABCDE
ABCDE
ABCDE
ABCDE
ABCDE
#include<stdio.h>
void main() {
  char i, j;
  for (i = 'A'; i <= 'E'; i++) {
    for (j = 'A'; j <= 'E'; j++) {
      printf("%c", j);
    }
    printf("\n");
  }
}

C Language Alphabet pattern 28

EEEEE
DDDDD
CCCCC
BBBBB
AAAAA
#include<stdio.h>
void main() {
  char i, j;
  for (i = 'E'; i >= 'A'; i--) {
    for (j = 'E'; j >= 'A'; j--) {
      printf("%c", i);
    }
    printf("\n");
  }
}

C Language Alphabet pattern 29

EDCBA
EDCBA
EDCBA
EDCBA
EDCBA
#include<stdio.h>
void main() {
  char i, j;
  for (i = 'E'; i >= 'A'; i--) {
    for (j = 'E'; j >= 'A'; j--) {
      printf("%c", j);
    }
    printf("\n");
  }
}

C Language Alphabet pattern 30

           A
        BBB
     CCCCC
  DDDDDDD
EEEEEEEEE
#include<stdio.h>
void main() {
  int m = 1;
  int p_height = 5;
  int p_space = p_height - 1;
  int i, j, k;
  for (i = 0; i < p_height; i++) {
    for (j = p_space; j > i; j--) {
      printf(" ");
    }
    for (k = 0; k < m; k++) {
      printf("%c", i + 65);
    }
    m += 2;
    printf("\n");
  }
}

C Language Alphabet pattern 31

#include<stdio.h>
void main() {
  int m = 0;
  int p_height = 5;
  int p_space = p_height - 1;
  int i, j, k;
  for (i = 0; i < p_height; i++) {
    for (j = p_space; j > i; j--) {
      printf(" ");
    }
    for (k = 0; k <= m; k++) {
      printf("%c", m + 65); // 65 is the ASCII of 'A'
    }
    m += 2;
    printf("\n");
  }
}

Also check

 All star patterns using C programming Language

 List of C Language Loop Programs with Examples

12 thoughts on “C Programs to print Alphabet Pattern | alphabet pattern programs in c”

Leave a Comment