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

progrem to generate the following series
1
12
123
1234
12345

Answer Posted / f.hnayan

#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
for(a=0;a<=4;a++)
{
for(b=1;b<=(a+1);b++)
{
printf("%d\t",b);
}
printf("\n");
}

return 0;
}

Is This Answer Correct ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a free-standing and a hosted environment?

1157


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1861


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2036


Explain how can I open a file so that other programs can update it at the same time?

1130


Explain how can I right-justify a string?

1058


please send me the code for multiplying sparse matrix using c

2190


What are enumerated types?

1210


Linked lists -- can you tell me how to check whether a linked list is circular?

1102


How can I make sure that my program is the only one accessing a file?

1300


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1108


how can f be used for both float and double arguments in printf? Are not they different types?

1083


I came across some code that puts a (void) cast before each call to printf. Why?

1234


When should you use a type cast?

1136


How can I get back to the interactive keyboard if stdin is redirected?

1200


Explain what are preprocessor directives?

1085