Alphabet Patterns in C | C Program to Print Alphabet Triangle

Alphabet Patterns in C


The source code of alphabet triangle in C programming is as follows:

/*
Write a C program to print alphabet pattern
triangle as shown below
A
AB
ABC
ABCD
ABCDE
*/
#include<stdio.h>  
int main()   
{   
  int row, col;  
  for( row = 65; row <=69;row++)
  {
  	for(col=65 ; col<=row; col++)
	   printf("%c",col);   
  	printf("\n");
  }
  return 0;
}  

Here is an image to show the sample run and ouput of this Alphabet pattern triangle in C programming: