Home » C Programming » Arrays » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void fun(int number[][3])
    {
    number[0][1] = 15;
    int k = 0, L = 0;
    for (k = 0; k < 2; k++)
    for (L = 0; L < 3; L++)
    printf("%d ", number[k][L]);
    }
    void main()
    {
    int number[2][3] = {0};
    fun(number);
    }
    1. 0 15 0 0 0 Garbage value
    2. Runtime Error
    3. Compilation Error
    4. Only garbage value
    5. 0 15 0 0 0 0
Correct Option: E

0 15 0 0 0 0



Your comments will be displayed only after manual approval.