A two dimensional array A is declared as int A[4] [2] ={0} .
What values would be printed after execution the following statement?
printf("%d",sizeof(A));
Answers
Answered by
4
Answer : Output is 32.
Explanation :
int A[4][2] = {0}
Total elements in A = 4 × 2
Total elements in A = 8
Size of int data type = 4
So, total size of array A = 4 × 8
Total size = 32
Therefore, Output = 32
More information :
Size of int = 4
Size of char = 1
Size of float = 4
Size of double = 8
Similar questions