C Alphabet Pattern Program

In this article, we will learn how to print different C alphabet pattern program. We will use two loops to print pattern: one outer loop and one inner loop. The outer loop will point to each row of the pattern and the inner loop will print the characters. Following is the list of programs:


Pattern 1

alphabet-pattern-program1
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=1; j<=i; j++) { printf("%c ", alphabet); alphabet++; } printf("\n"); } return 0; }
alphabet-pattern-program1

Pattern 2

alphabet-pattern-program2
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=5; i>=1; i--) { for (j=1; j<=i; j++) { printf("%c ", alphabet); alphabet++; } printf("\n"); } return 0; }
alphabet-pattern-program2

Pattern 3

alphabet-pattern-program3
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=1; j<=i; j++) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program3

Pattern 4

alphabet-pattern-program4
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=5; i>=1; i--) { for (j=1; j<=i; j++) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program4

Pattern 5

alphabet-pattern-program5
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=5; j>=i; j--) { alphabet = alphabet+i; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program5

Pattern 6

alphabet-pattern-program6
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=1; j<=i; j++) { alphabet = alphabet+i; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program6

Pattern 7

alphabet-pattern-program7
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=5; j>=i; j--) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program7

Pattern 8

alphabet-pattern-program8
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=5; i>=1; i--) { for (j=5; j>=i; j--) { alphabet = alphabet+i; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program8

Pattern 9

alphabet-pattern-program9
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=1; j<=5; j++) { printf("%c ", alphabet); alphabet++; } printf("\n"); } return 0; }
alphabet-pattern-program9

Pattern 10

alphabet-pattern-program10
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=1; j<=5; j++) { printf("%c ", alphabet); } printf("\n"); alphabet++; } return 0; }
alphabet-pattern-program10

Pattern 11

alphabet-pattern-program11
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=i; j<=5; j++) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program11

Pattern 12

alphabet-pattern-program12
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=5; i>=1; i--) { for (j=i; j>=1; j--) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program12

Pattern 13

alphabet-pattern-program13
Program
#include<stdio.h> int main() { int i, j, k; char alphabet='A'; for(i=1; i<=5; i++) { for (j=5-i; j>=1; j--) { printf(" "); } for(k=1; k<=i; k++) { alphabet = alphabet+k; printf("%c", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program13

Pattern 14

alphabet-pattern-program14
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=5; i>=1; i--) { for (j=i; j<=5; j++) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program14

Pattern 15

alphabet-pattern-program15
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=i; j>=1; j--) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program15

Pattern 16

alphabet-pattern-program16
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=5; i>=1; i--) { for (j=1; j<=i; j++) { alphabet = alphabet+i; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program16

Pattern 17

alphabet-pattern-program17
Program
#include<stdio.h> int main() { int i, j, k; char alphabet='A'; for(i=5; i>=1; i--) { for (j=1; j<i; j++)
{
printf(" ");
}
for(k=5; k>=i; k++) { alphabet = alphabet+k; printf("%c", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program17

Pattern 18

alphabet-pattern-program18
Program
#include<stdio.h>
int main()
{
int i, j, k;
char alphabet='A';
for (i=1; i<=5; i++)
{
for (j=5; j>i; j--)
{
printf(" ");
}
for (k=1; k<=i; k++)
{
alphabet = alphabet+k;
printf("%c ", alphabet-1);
alphabet='A';
}
printf("\n");
}
return 0;
}
alphabet-pattern-program18

Pattern 19

alphabet-pattern-program19
Program
#include<stdio.h> int main() { int i, j; char alphabet='A'; for(i=1; i<=5; i++) { for (j=1; j<=5; j++) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program19

Pattern 20

alphabet-pattern-program20
Program
#include<stdio.h> int main() { int i, j, k; char alphabet='A'; for(i=1; i<=5; i++) { for (j=5; j>i; j--) { printf(" "); } for(k=1; k<=i; k++) { alphabet = alphabet+i; printf("%c", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program20

Pattern 21

alphabet-pattern-program21
Program
#include<stdio.h> int main() { int i, j, k; char alphabet='A'; for(i=1; i<=5; i++) { for (j=1; j<=5-i; j++) { printf(" "); } for(k=1; k<=i; k++) { alphabet = alphabet+j; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program21

Pattern 22

alphabet-pattern-program22
Program
#include<stdio.h> int main() { int i, j, k; char alphabet='A'; for(i=5; i>=1; i--) { for (j=1; j<=5-i; j++) { printf(" "); } for(k=1; k<=i; k++) { alphabet = alphabet+k; printf("%c ", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program22

Pattern 23

alphabet-pattern-program23
Program
#include<stdio.h> int main() { int i, j, k; char alphabet='A'; for(i=5; i>=1; i--) { for (j=1; j<=5-i; j++) { printf(" "); } for(k=1; k<=i; k++) { alphabet = alphabet+k; printf("%c", alphabet-1); alphabet='A'; } printf("\n"); } return 0; }
alphabet-pattern-program23

Note:

  • All the programs are compiled and executed in Dev C++ code editor and save with .c extension.

More Topics