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
Explain how do you generate random numbers in c?
What are structure types in C?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
When should a type cast not be used?
What is file in c preprocessor?
What functions are used in dynamic memory allocation in c?
Does c have circular shift operators?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What is the function of multilevel pointer in c?
What do you mean by keywords in c?
Create a simple code fragment that will swap the values of two variables num1 and num2.
What is the use of typedef in structure in c?
Explain what is the difference between #include and #include 'file' ?
What is c method?
What is array of pointers to string?