What will be the output of the following C function? [code] #include <stdio.h> int main() { reverse(1); } void

Thành Nguyễn

New member
What will be the output of the following C function?
Code:
    #include <stdio.h>
    int main()
    {
        reverse(1);
    }
    void reverse(int i)
    {
        if (i > 5)
            exit(0);
        printf("%d\n", i);
        return reverse(i++);
    }
A. 1 2 3 4 5
B. 1 2 3 4
C. Compile time error
D. Stack overflow
 

Tìm kiếm

Back
Top