Consider the following function written in the C programming language. void…
PYQ GATE 2015
Consider the following function written in the C programming language.
void foo(char *a) {
if (*a && *a != ' ') {
foo(a+1);
putchar(*a);
}
}The output of the above function on input “ABCD EFGH” is
- A.
ABCD EFGH
- B.
ABCD
- C.
HGFE DCBA
- D.
DCBA
Attempted by 361 students.
Sign up free to check your answer
Sign up freeLoading lesson…

