program in c to print 1 to 100 without using loop
Answer Posted / gadigebhasker
void otoh(int,int);
void main()
{
int x,y;
printf("enter initial value x & y final value\n");
scanf("%d%d",&x,&y);
printf("0 to 100 number\n");
otoh(x,y);
getch();
}
void otoh(int a,int i)
{
if(a<=i)
{
printf("%d\t",a++);
otoh(a,i);
}
else
printf("END");
}
| Is This Answer Correct ? | 27 Yes | 4 No |
Post New Answer View All Answers
What are c preprocessors?
What is c++ used for today?
Explain what is the difference between #include and #include 'file' ?
What are derived data types in c?
write a program fibonacci series and palindrome program in c
What is data type long in c?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What does c in a circle mean?
what is the significance of static storage class specifier?
Do you know null pointer?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
How do we make a global variable accessible across files? Explain the extern keyword?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What is #define?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .