Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / harsha
#include<stdio.h>
int i=0;
void main()
{
if(i==0)
clrscr();
if(i<100) {
printf("%d \t",++i);
main(); }
else {
getch();
exit(0); }
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Can main () be called recursively?
How can you determine the size of an allocated portion of memory?
Difference between constant pointer and pointer to a constant.
Write a program to swap two numbers without using a temporary variable?
What is static memory allocation? Explain
Explain what is the benefit of using an enum rather than a #define constant?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
How do you define CONSTANT in C?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
Explain function?
Combinations of fibanocci prime series
What is a example of a variable?
Explain what is the difference between a free-standing and a hosted environment?
What does 3 mean in texting?
Explain the use of fflush() function?