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


Please Help Members By Posting Answers For Below Questions

Explain what is the best way to comment out a section of code that contains comments?

728


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

604


Explain how can I open a file so that other programs can update it at the same time?

599


why do some people write if(0 == x) instead of if(x == 0)?

664


Difference between Function to pointer and pointer to function

638






Why c is procedure oriented?

580


What is pointer & why it is used?

609


Explain what are linked list?

628


An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above

712


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

665


Tell me what are bitwise shift operators?

664


What is a header file?

644


What are the application of void data type in c?

738


Which is better between malloc and calloc?

677


What is difference between far and near pointers?

614