Question 53

Consider the following C code segment
int f (int x)
{
if (x < 1) return 1;
else return (f(x - 1) + g(x));
}
int g (int x)
{
if(x < 2) return 2;
else return (f(x - 1) + g(x/2));
}
Of the following, which best describes the growth of f(x) as a function of x ?


Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

cracku

Boost your Prep!

Download App