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


Give the Output :
*
* *
* * *
* * * *

Answers were Sorted based on User's Feedback



Give the Output : * * * * * * * * * * ..

Answer / sakthipriya

#include<stdio.h>
#include<conio.h>
void main()
{
int n=4, c, k, space, count = 1;
space = n;
for ( c = 1 ; c <= n ; c++)
{
for( k = 1 ; k < space ; k++)
printf(" ");
for ( k = 1 ; k <= c ; k++)
{
printf("*");
if ( c > 1 && count < c)
{
printf(" ");
count++;
}
}
printf("\n");
space--;
count = 1;
}
getch();
}

Is This Answer Correct ?    0 Yes 0 No

Give the Output : * * * * * * * * * * ..

Answer / prasanna

int i,j;
for(i=o;i<4;i++)
{
for(j=0;j<=i;j++)
{
printf("*");
}
}

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More C Interview Questions

What is %g in c?

0 Answers  


what is the diff between the printf and sprintf functions?? and what is the syntax for this two functions ??

5 Answers  


What is property type c?

0 Answers  


write a code for large nos multilication (upto 200 digits)

2 Answers   Persistent,


What is spaghetti programming?

0 Answers  






what is computer

4 Answers  


How do you initialize pointer variables?

0 Answers  


Why array starts with index 0

2 Answers  


What is malloc() function?

0 Answers  


why do we use # in c-language?

1 Answers  


What are all different types of pointers in c?

0 Answers  


Is printf a keyword?

0 Answers  






Categories