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
Can an array be an Ivalue?
Explain spaghetti programming?
What is memory leak in c?
Explain the use of bit fieild.
Explain low-order bytes.
What is getch?
Differentiate between full, complete & perfect binary trees.
What is meant by initialization and how we initialize a variable?
Define macros.
write a program to print largest number of each row of a 2D array
what are the advantages of a macro over a function?
Are pointers really faster than arrays?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Explain how are 16- and 32-bit numbers stored?
What is the best style for code layout in c?