what is the code for getting the output as
*
**
***
Answer Posted / anvesh
main()
{
printf("*\n**\n***);
}
OR
main()
{
int n,i;
while(n<3)
{
i=0;
while(i<=n)
{printf("*");i++;}
printf("\n); n++;
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Can we access the array using a pointer in c language?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
What is identifier in c?
What does c mean in basketball?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What are pointers? What are stacks and queues?
What is function prototype in c language?
Multiply an Integer Number by 2 Without Using Multiplication Operator
Can you think of a logic behind the game minesweeper.
What is the size of enum in c?
How is = symbol different from == symbol in c programming?
Where we use clrscr in c?
What is storage class?
Why is c so important?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?