Home » C Programming » Variables » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    fun();
    fun();
    }
    void fun()
    {
    int k = 15;
    printf("%d ", k);
    static int L = 16;
    L = L + 1;
    printf("%d\n", L);
    }
    1. 15 17
    2. 15 18
    3. 15 17
      15 18
    4. 17 15
    5. None of these
Correct Option: C

15 17
15 18



Your comments will be displayed only after manual approval.