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 difference between structure and union in c programming?
What is extern variable in c with example?
How we can insert comments in a c program?
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 ].
What is exit() function?
What is the difference between a free-standing and a hosted environment?
How can I do peek and poke in c?
Why we use stdio h in c?
What is the stack in c?
Explain what is dynamic data structure?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
Explain bitwise shift operators?
What are identifiers in c?
What is self-referential structure in c programming?
What is the purpose of the preprocessor directive error?