Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / professor uday kumar bhupathi
void main(int n)
{
if(n==0)
return;
main(--n);
printf("%d ",n);
getch();
}
| Is This Answer Correct ? | 12 Yes | 16 No |
Post New Answer View All Answers
Explain what is the use of a semicolon (;) at the end of every program statement?
How many bytes are occupied by near, far and huge pointers (dos)?
What is the difference between #include and #include 'file' ?
Explain b+ tree?
Explain what does the function toupper() do?
What is the use of header?
How would you rename a function in C?
What is the meaning of c in c language?
Explain what is #line used for?
Explain the difference between getch() and getche() in c?
Why double pointer is used in c?
Is it possible to execute code even after the program exits the main() function?
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What are the differences between Structures and Arrays?