Given the following recursive function definition, what is the stopping case?
void towers(char source, char dest, char help, int numDisks)
{
if(numDisks<1)
{
return;
}
else
{
towers(source,help,dest,numDisks-1);
cout << "Move disk from " << source << " to " <
}
}
a. numDisks == 1
b. numDisks >1
c. numDisks < 1
d. numDisks =0
c. numDisks < 1
Computer Science & Information Technology
You might also like to view...
Exceptions can be thrown by ________.
a. the Java Virtual Machine. b. code in a try block. c. calls from a try block to other methods. d. All of the above.
Computer Science & Information Technology
IMAP users can't work with email while offline.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology