Question PSC-FUNC-0052
MediumWhat does the following pseudocode print?
Function rev(String s)
if (length(s) <= 1)
return s
end if
return rev(substring(s, 1)) + s[0]
End Function
Print rev("code")
- A.
eodc
- B.
edoc
- C.
Sign up free to see the answer and a step-by-step explanation.