The declaration int arr[2][5]; will allocate how much bytes
Answers
Answered by
6
40 bytes.
int arr[2][5] creates a two-dimensional array, with two rows and five columns.
A typical integer type variable requires 4 bytes of space.
Here we are creating two rows and 5 columns. So, the total number of variables that can be stored is variables.
Since one integer type variable takes 4 bytes space, 10 such variables will take a space of
Thus, the answer is 40 bytes.
[NOTE: In some old systems, int used to be 2 bytes for each variable. In that case, the answer would become 20 bytes. However, modern standards are that of 4 bytes for int data type]
int arr[2][5] creates a two-dimensional array, with two rows and five columns.
A typical integer type variable requires 4 bytes of space.
Here we are creating two rows and 5 columns. So, the total number of variables that can be stored is variables.
Since one integer type variable takes 4 bytes space, 10 such variables will take a space of
Thus, the answer is 40 bytes.
[NOTE: In some old systems, int used to be 2 bytes for each variable. In that case, the answer would become 20 bytes. However, modern standards are that of 4 bytes for int data type]
Similar questions