Home » C Programming » Operators » Question
  1. What will be the output of the following C function?
    #include <stdio.h>
    int main()
    {
    Function(1);
    }
    void Function(int k)
    {
    if (k > 5)
    exit(0);
    printf("%d\n", k);
    return Function(k++);
    }
    1. 5 4 3 2 1
    2. 1 2 3 4 5
    3. 4 3 2 1
    4. Compilation Error
    5. Stack overflow
Correct Option: E

Stack overflow



Your comments will be displayed only after manual approval.