C Program - Print Character Pattern

#include <stdio.h>

int main() {
    char ch;
    int i, j;
    for(i = 1; i <= 5; i++) {
        ch = 'A';  // Start from A every new row
        for(j = 1; j <= i; j++) {
            printf("%c ", ch);
            ch++;  // Move to next character
        }
        printf("\n");
    }
    return 0;
}
A
A B
A B C
A B C D
A B C D E
Sai Kishore Randhi, author
About the author

Sai Kishore Randhi

Embedded systems, VLSI, and chip design

Sai Kishore writes about embedded systems, VLSI, chip design, and the programming concepts behind modern hardware.

View LinkedIn profile ↗