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
Write a program to print fibonacci series using recursion?
How does free() know explain how much memory to release?
What is the description for syntax errors?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What is static function in c?
Explain the red-black trees?
What is a built-in function in C?
What is volatile c?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
By using C language input a date into it and if it is right?
Is there a built-in function in C that can be used for sorting data?
Can you pass an entire structure to functions?
What does a function declared as pascal do differently?
What is non linear data structure in c?
List the difference between a "copy constructor" and a "assignment operator"?