Question

    Below code will give what result for f(3)

    f(int x)

    {

    If(x

    Return;

    f(x-1);

    printf(“%d”, x);

    f(n-1);

    }

    A 1213121 Correct Answer Incorrect Answer
    B 1212121 Correct Answer Incorrect Answer
    C 3212321 Correct Answer Incorrect Answer
    D 1231231 Correct Answer Incorrect Answer
    E 3211233 Correct Answer Incorrect Answer

    Solution

    execute the code with recursion tree and then use backtracking.

    Practice Next