#include<stdio.h>
#include<conio.h>

void main()
{
 /* Storing same string in two different variable in required format 
    is simple hack for question to avoid too many if-else statement 
 */
 char string1[] = "PuLcHoWk";
 char string2[] = "PULCHOWK";
 int i,j, length;
 clrscr();
 /* Pattern */
 for(i=0;i< 8;i++)
 {
  for(j=0;j<=i;j++)
  {
   if(i==3||i==5||i==7)
   {
    putchar(string2[j]);
   }
   else
   {
    putchar(string1[j]);
   }
  }
  putchar('\n');
 }
 getch();
}

Output

P
Pu
PuL
PULC
PuLcH
PULCHO
puLcHoW
PULCHOW

Leave a Reply

Your email address will not be published. Required fields are marked *

https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
About
Products
Subscribe

If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

    Applauz

    As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

    Subscribe

    If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

      Applauz

      As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

      Copyright by BOLD THEMES. All rights reserved.