Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2015 Set 2
Questions

Q15

MCQ1 mark, −0.33ProgrammingMedium

Consider the following function written in the C programming langauge :

void foo(char *a)
{
    if (*a && *a != ' ')
    {
        foo(a+1);
        putchar(*a);
    }
}

The output of the above function on input "ABCD EFGHABCD \ EFGH" is

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.