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...


Write a program to produce the following output:
1
2 3
4 5 6
7 8 9 10



Write a program to produce the following output: 1 2 3 ..

Answer / ashok kumar

void main()
{
int n,i,j,k=1;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=i;j<n;j++)
printf(" ");
for(j=1;j<=i;j++)
printf(" %d ",k++);
printf("\n");
}
getch();
}

Is This Answer Correct ?    31 Yes 19 No

Post New Answer

More C Interview Questions

What is the size of enum in bytes?

0 Answers  


How can I open files mentioned on the command line, and parse option flags?

0 Answers  


Explain the advantages and disadvantages of macros.

0 Answers   TCS,


Differentiate call by value and call by reference?

0 Answers   Cyient,


program that accepts amount in figures and print that in words

2 Answers   Infosys, Lovely Professional University, Wipro,


If null and 0 are equivalent as null pointer constants, which should I use?

0 Answers  


Is c high or low level?

0 Answers  


What is chain pointer in c?

0 Answers  


Explain the properties of union. What is the size of a union variable

0 Answers  


develop algorithms to add polynomials (i) in one variable

0 Answers   Ignou, TCS,


Explain the array representation of a binary tree in C.

0 Answers   Genpact,


simple c program for 12345 convert 54321 with out using string

7 Answers   TCS,


Categories