Output for following program using for loop only
*
* *
* * *
* * * *
* * * * *

Answer Posted / sjyamsunderreddy.beemudi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf(\n);
}
getch();
}

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is local and global variable in c?

612


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

712


In c programming language, how many parameters can be passed to a function ?

626


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

974


Describe the order of precedence with regards to operators in C.

628






What is the description for syntax errors?

609


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3245


What is null pointer in c?

589


What is action and transformation in spark?

589


Difference between strcpy() and memcpy() function?

671


what is the difference between class and unio?

1854


Why main is used in c?

583


Where are c variables stored in memory?

592


Explain why C language is procedural?

766


What are the 5 elements of structure?

559