Computer Sciences > Gate 2015 Set-2 > C Code
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

Correct : C Code

Similar Questions

The following function computes XY for positive integers X and Y. int exp(int X, int Y) {     int res = 1, a = X, b = Y;     while ( b...
#93 MCQ
The following function computes XY for positive integers X and Y. int exp(int X, int Y) {     int res = 1, a = X, b = Y;     while ( b...
#93 MCQ
The following function computes XY for positive integers X and Y. int exp(int X, int Y) {     int res = 1, a = X, b = Y;     while ( b...
#93 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......