‹ Back to the paper
int Toy(int n) { return (n<=0)? 1: n%10 + Toy(n/10); } With reference to the program code given…
int Toy(int n)
{ return (n<=0)? 1: n%10 + Toy(n/10); }With reference to the program code given above, what will the function `Toy()` return when the value of $n = 56$?- (a)65
- (b)12
- (c)651
- (d)11
Answer
No answer yet.
From ISC 2022 Computer Science - Specimen paper (Semester 2), Paper 1, question 1(iii).