program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / devi
#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 ? | 19 Yes | 2 No |
Post New Answer View All Answers
Which one would you prefer - a macro or a function?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
Is it possible to execute code even after the program exits the main() function?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
Is printf a keyword?
What is sizeof array?
Can you subtract pointers from each other? Why would you?
int i=10; printf("%d %d %d", i, i=20, i);
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Where define directive used?
Why cant I open a file by its explicit path?
Explain how can I make sure that my program is the only one accessing a file?
Is sizeof a keyword in c?
Define circular linked list.