Write a program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements.
Answer Posted / dhanashree n.gavade
int i,j,m;
m=2;
for(i=0;i<5,i++)
{
putch('*');
putch('\n');
for(j=i;j<=j+m;j++)
putch('*');
m=j;
putch('\n');
}
| Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
Explain the properties of union. What is the size of a union variable
Why void main is used in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
How do c compilers work?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
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
What are structures and unions? State differencves between them.
What is cohesion in c?
Explain bitwise shift operators?
Explain low-order bytes.
What is the value of uninitialized variable in c?
What are qualifiers in c?
How many loops are there in c?
What Is The Difference Between Null And Void Pointer?