Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


write a program in c to print ****
* *
* *
****



write a program in c to print **** * * ..

Answer / rajkumar

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
for(i=0;i<=3;i++)
{
printf("*");
}
for(i=4;i<5;i++)
{
printf(" ");
}
for(i=5;i<6;i++)
{
printf("*");
}
for(i=6;i<7;i++)
{
printf(" ");
}
for(i=7;i<8;i++)
{
printf("*");
}
for(i=8;i<9;i++)
{
printf(" ");
}
for(i=9;i<10;i++)
{
printf("*");
}
for(i=10;i<11;i++)
{
printf(" ");
}
for(i=11;i<12;i++)
{
printf("*");
}
for(i=12;i<13;i++)
{
printf(" ");
}
for(i=12;i<=15;i++)
{
printf("*");
}
getch();
}

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C Interview Questions

Where are c variables stored in memory?

0 Answers  


What is static memory allocation? Explain

0 Answers  


Write a program to check whether a number is prime or not using c?

0 Answers  


Why does the call char scanf work?

0 Answers  


what is C?

9 Answers   Syntel,






#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?

4 Answers   Ramco,


When is a void pointer used?

0 Answers  


How do you print only part of a string?

0 Answers  


What does typeof return in c?

0 Answers  


increment operateor (++)and decrament(--) #include<stdio.h> #inclide<conio.h> main() { int x=15; while(x!=0) scanf("%d",&x); {

2 Answers   HCL, Syntel, TCS,


write a program that accepts 3 numbers from the user. dispaly the values in a descending order.

3 Answers  


writ a program to compare using strcmp VIVA and viva with its output.

0 Answers  






Categories