Home » C Programming » Arrays » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int array[2][3] = {10, 20, 30, 40, 50};
    int k = 0, L = 0;
    for (k = 0; k < 2; k++)
    for (L = 0; L < 3; L++)
    printf("%d ", array[k][L]);
    }
    1. 10 20 30 40 50
    2. Compilation Error
    3. Garbage value
    4. 10 20 30 40 50 0
    5. None of these
Correct Option: D

10 20 30 40 50 0



Your comments will be displayed only after manual approval.