+ 1

What is the size of array

int arr[4][7]

14th Oct 2016, 5:39 PM
yASh tHaKuR
yASh tHaKuR - avatar
4 Antworten
+ 2
4*7 = 28. This array can store 28 integers.
14th Oct 2016, 6:31 PM
Zen
Zen - avatar
+ 2
Every integer variable has 2 bytes. This arr is a multidimensional array which can contain 28 integer elements therefore the size of array is 28*2 i.e 56 bytes. You can find the size of the array by writing this statement cout<<sizeof(arr); .
14th Oct 2016, 6:56 PM
Divye Bhutani
Divye Bhutani - avatar
0
Array starts with 0 and ends with n-1
15th Oct 2016, 2:49 AM
Joyston mendonca
Joyston mendonca  - avatar
0
Array starts with 0 and ends with n-1
15th Oct 2016, 2:49 AM
Joyston mendonca
Joyston mendonca  - avatar