Home » C Programming » Arrays » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int num[3][4][5], k = 12;
    num[0][0] = &k;
    printf("%d\n", *num[0][0]);
    }
    1. Address of k
    2. Compilation Error
    3. Undefined behaviour
    4. 12
    5. None of these
Correct Option: B

Compilation Error

main.c: In function ‘main’:
main.c:5:19: error: assignment to expression with array type
num[0][0] = &k;



Your comments will be displayed only after manual approval.