Solved

In the Following Function, How Many Recursive Calls Are There

Question 7

Multiple Choice

In the following function, how many recursive calls are there?
Void towerschar source, char dest, char help, int numDisks)
{
IfnumDisks<1)
{
Return;
}
Else
{
Towerssource,help,dest,numDisks-1) ;
Cout << "Move disk from " << source << " to " <<dest<<endl;
Towershelp,dest,source,numDisks-1) ;
}
}


A) 0
B) 1
C) 2
D) 3

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions