program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / shashi kumar c.a
#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",j);
}
}
getch();
}
| Is This Answer Correct ? | 13 Yes | 20 No |
Post New Answer View All Answers
What are c header files?
Why do we use stdio h and conio h?
Can static variables be declared in a header file?
What is C language ?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
What is the difference between struct and union in C?
How can I convert a number to a string?
Explain the use of 'auto' keyword in c programming?
What are dangling pointers? How are dangling pointers different from memory leaks?
Write a program to print all permutations of a given string.
Why do we use return in c?
What is the value of c?
Describe how arrays can be passed to a user defined function
What is the use of linkage in c language?
Define C in your own Language.