program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5

Answer Posted / dhruv sharma rkdf

#include<stdio.h>
#include<conio.h>
void main(){
int i,j;
clrscr();
for(i=1;i<=5;i++){
for(j=i;j<=5;j++){
printf("%d ",j)
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c called c not d or e?

622


Give me the code of in-order recursive and non-recursive.

893


Why do we use pointer to pointer in c?

605


What is bss in c?

609


Is there a way to switch on strings?

623






What is null pointer in c?

602


Is c still used?

612


Explain #pragma statements.

608


What is the difference between near, far and huge pointers?

635


Why is c faster?

600


What are the types of assignment statements?

635


What are the different properties of variable number of arguments?

669


Explain the difference between call by value and call by reference in c language?

655


What is your stream meaning?

611


Explain what does it mean when a pointer is used in an if statement?

621