?
What is the size of an integer array declared as int arr[5] in bytes?
Answer & Solution
Correct Answer:
Option
B
The size of an integer array declared as int arr[5] in bytes depends on the size of an integer in the system. Typically, the size of an int is 4 bytes.
Calculation:
The array arr has 5 elements.
Each int is 4 bytes.
Total size = 5 * 4 = 20 bytes
Therefore, the size of int arr[5] is 20 bytes.
Calculation:
The array arr has 5 elements.
Each int is 4 bytes.
Total size = 5 * 4 = 20 bytes
Therefore, the size of int arr[5] is 20 bytes.
Join the Discussion
Login to post a comment or share your explanation.
Login4*5=20 bytes