what is the code for getting the output as
*
**
***

Answer Posted / babitha

# include <Stdio.h>
# include <conio.h>
# include <string.h>

void main()
{
int j,i,n;

scanf("%d",&n);

for (i=0;i<=n;i++)
{
for(j=0;j<i;j++)
printf("*");
printf("\n");
}

getch();

}

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you apply link and association interchangeably?

661


What is the difference between printf and scanf in c?

734


What does c mean in standard form?

587


What are the 32 keywords in c?

619


Implement bit Array in C.

660






Differentiate between Macro and ordinary definition.

714


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

1758


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

1620


Can we change the value of static variable in c?

550


What are the keywords in c?

632


What does the characters “r” and “w” mean when writing programs that will make use of files?

839


Explain what is the use of a semicolon (;) at the end of every program statement?

714


Explain how can I manipulate strings of multibyte characters?

767


What is the use of clrscr?

579


explain what are actual arguments?

622