Give the Output :
*
* *
* * *
* * * *
Answers were Sorted based on User's Feedback
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 |
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 |
what is difference between array of characters and string
What does *p++ do?
What are qualifiers in c?
What is sizeof array in c?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
what is the difference between %d and %*d in c languaga?
main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0; } a)0 1 6 2 b)0 1 6 7 c)Compilation error d)None of the above
What are pointers in C?
the expression a=30*1000+2768; evalutes to a) 32768 b) -32768 c) 113040 d) 0
What does double pointer mean in c?
Which of the following about the C comments is incorrect ? a.commentscan go over multiple lines b.comments can start any where in the line c.a line can contain comments with out any language statements d.comments can occur within comments