Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / rajarshi bhadra

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();

for(i=5;i>=0;i--)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    4 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the priority queues?

1084


Why does notstrcat(string, "!");Work?

1156


Explain the difference between structs and unions in c?

1033


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1141


What is merge sort in c?

1054


What is stack in c?

1088


What is dynamic dispatch in c++?

1072


How can I change the size of the dynamically allocated array?

1156


c language interview questions & answer

1970


Here is a neat trick for checking whether two strings are equal

1027


What is memory leak in c?

1136


What do you mean by a local block?

1092


how to construct a simulator keeping the logical boolean gates in c

2264


What is function pointer c?

1124


Is fortran faster than c?

1049