C Program to Display "C Programing" Pyramid

In this program, you'll learn to print pyramid of "C Programming".



Source Code
#include<stdio.h>
#include<string.h>

int main()
{
    char s[] = "C Programming";
    int i, j;

    for(i=0; i<strlen(s); i++)
    {
        for(j=0;j<=i; j++)
        {
            printf("%c", s[j]);
        }
        printf("\n");
    }
    return 0;
}
Output
C
C
C P
C Pr
C Pro
C Prog
C Progr
C Progra
C Program
C Programm
C Programmi
C Programmin
C Programming





"Coding Hub - Learn to code" app now available on Google Play Store