program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / lohith
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 43 Yes | 9 No |
Post New Answer View All Answers
What is hungarian notation? Is it worthwhile?
How to set file pointer to beginning c?
i have a written test for microland please give me test pattern
Explain the properties of union. What is the size of a union variable
What are different types of variables in c?
Is it better to use a macro or a function?
Can the size of an array be declared at runtime?
Is using exit() the same as using return?
What are pointers? What are different types of pointers?
Which header file is used for clrscr?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
What is header file in c?
Is null valid for pointers to functions?
Explain logical errors? Compare with syntax errors.
How can I trap or ignore keyboard interrupts like control-c?