Question:What does the following recursive function do, assuming that $x and $y are initially positive integers? function func($x,$y) { if($x <=0) { return $y; } else { return (1 +func($x-1,$y)); } } 

A it just returns $y 

B it just returns $x 

C it computes and returns $x+$y 

D it computes and returns $x*$y 

+ Answer
+ Report
Total Preview: 752

Copyright © 2024. Powered by Intellect Software Ltd