Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / sagar
we can also create such a program without using loops and if
statement too ...
void main()
{
int i,n;
clrscr();
A:
printf("%d",i);
n=i++;
switch(n)
{
case 100: break;
default : goto A;
}
getch();
}
| Is This Answer Correct ? | 9 Yes | 7 No |
Post New Answer View All Answers
What is operator precedence?
Can a variable be both static and volatile in c?
What is volatile variable in c with example?
What is storage class?
What is the difference between printf and scanf in c?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
What is difference between function overloading and operator overloading?
What is clrscr ()?
What is the use of printf() and scanf() functions?
find the sum of two matrices and WAP for it.
What is the use of define in c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Is it better to use malloc() or calloc()?
What is volatile, register definition in C
How do we open a binary file in Read/Write mode in C?