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 is the difference between struct and typedef struct in c?
What is wild pointer in c with example?
Is it better to use malloc() or calloc()?
List the difference between a While & Do While loops?
What is function pointer c?
What are the rules for the identifier?
What are the different file extensions involved when programming in C?
Describe the modifier in c?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What the advantages of using Unions?
What is pointer to pointer in c?
How can you read a directory in a C program?
Explain what is #line used for?
How do we open a binary file in Read/Write mode in C?
Can we increase size of array in c?