Solved

Given the Following Recursive Function Definition, What Is the Stopping

Question 21

Multiple Choice

Given the following recursive function definition, what is the stopping case?
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) numDisks == 1
B) numDisks >1
C) numDisks < 1
D) numDisks =0

Correct Answer:

verifed

Verified

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

Related Questions