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 the differnce between programing langauge and tool? is sas is a programing langauge r tool?
why do some people write if(0 == x) instead of if(x == 0)?
Is that possible to add pointers to each other?
Which function in C can be used to append a string to another string?
What are 3 types of structures?
Is c++ based on c?
What is the value of uninitialized variable in c?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
What is a header file?
What is calloc malloc realloc in c?
Tell us something about keyword 'auto'.
What is malloc calloc and realloc in c?
Write a simple code fragment that will check if a number is positive or negative.
What is the benefit of using const for declaring constants?
What is the full form of getch?