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
Is stack a keyword in c?
what is the syallabus of computer science students in group- 1?
What is the description for syntax errors?
What is the use of getch ()?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
What does main () mean in c?
What is the purpose of 'register' keyword?
Can i use “int” data type to store the value 32768? Why?
What is the use of a static variable in c?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
how do you execute a c program in unix.
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What is define directive?
In a switch statement, explain what will happen if a break statement is omitted?
Tell me the use of bit field in c language?