⭐⚡Beginner
Print Character Pattern
Print pattern with alphabets
This program prints an alphabet pattern using character arithmetic.
Program Code
character_pattern.c
C
1#include <stdio.h>23int main() {4 int rows;5 6 printf("Enter number of rows: ");7 scanf("%d", &rows);8 9 for (int i = 1; i <= rows; i++) {10 for (int j = 1; j <= i; j++) {11 printf("%c ", 'A' + j - 1);12 }13 printf("\n");14 }15 16 return 0;17}Output
Enter number of rows: 5
A
A B
A B C
A B C D
A B C D E
Related Examples
Want to Learn More?
Explore our comprehensive tutorials for in-depth explanations of C programming concepts.
Browse Tutorials