What is indirect recursion? give an example?

Answer Posted / j j ramesh / ap / mca / jjcet

void fun1();
void fun2();
int i=0;

void main()
{
clrscr();
printf("\n\n\n");

fun1();

getch();
}

void fun2()
{
if(i<5)
{
printf("Recursion from fun2 to fun1 which is indirect
recursion\n");
i++;
fun1();
}
}
void fun1()
{
fun2();
}

Is This Answer Correct ?    10 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1315


How will you delete a node in DLL?

686


What is the difference between text and binary i/o?

592


Why does this code crash?

621


write a program to find the given number is prime or not

3847






What are the 4 data types?

602


The file stdio.h, what does it contain?

668


Is it cc or c in a letter?

568


What is s in c?

618


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

646


Explain the process of converting a Tree into a Binary Tree.

2107


What is a double c?

592


What does %d do?

727


What is strcpy() function?

658


What should malloc() do?

645