program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / jayaraj.s
#include <stdio.h>
main()
{
int a,b,i=1;
for(a=i;a<=5;a++)
{
for(b=a;b<=5;b++)
{
printf("%d",b);
}
printf("\n");
i++;
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which is the memory area not included in C program? give the reason
Are the variables argc and argv are local to main?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What is a stream?
What is the maximum no. of arguments that can be given in a command line in C.?
How can I sort more data than will fit in memory?
How can I call fortran?
What is #include conio h?
Write a program to find factorial of a number using recursive function.
Is there any possibility to create customized header file with c programming language?
How to write a code for reverse of string without using string functions?
What is dynamic dispatch in c++?
Define Array of pointers.
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
How do you determine a file’s attributes?