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
What is the difference between a free-standing and a hosted environment?
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.
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
Explain how can I open a file so that other programs can update it at the same time?
Explain how can I right-justify a string?
please send me the code for multiplying sparse matrix using c
What are enumerated types?
Linked lists -- can you tell me how to check whether a linked list is circular?
How can I make sure that my program is the only one accessing a file?
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 ].
how can f be used for both float and double arguments in printf? Are not they different types?
I came across some code that puts a (void) cast before each call to printf. Why?
When should you use a type cast?
How can I get back to the interactive keyboard if stdin is redirected?
Explain what are preprocessor directives?