12345678910



Question 1: What will be the output of the program?

#include<stdio.h>

int main()
{
int arr[2][2][2] = {10, 2, 3, 4, 5, 6, 7, 8};
int *p, *q;
p = &arr[1][1][1];
q = (int*) arr;
printf("%d, %d ", *p, *q);
return 0;
}

1. 8, 10
2. 10, 2
3. 8, 1
4. Garbage values