Answer Posted / 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 |
Post New Answer View All Answers
What are the benefits of c language?
What is typeof in c?
Why does everyone say not to use gets?
Explain what does it mean when a pointer is used in an if statement?
Define recursion in c.
What is meant by inheritance?
Why should I prototype a function?
What is null pointer in c?
What is the purpose of 'register' keyword in c language?
What is the difference between malloc() and calloc() function in c language?
What is the use of pointers in C?
What is void pointers in c?
Tell us bitwise shift operators?
What is scope and lifetime of a variable in c?
Explain what math functions are available for integers? For floating point?