The memory consumed by an array declared as float arr[10][20]; is ________.

  • 2000 bytes
  • 400 bytes
  • 80 bytes
  • 800 bytes
The memory consumed by a two-dimensional array is calculated by multiplying the number of rows by the number of columns and then multiplying it by the size of the data type. In this case, it's 10 (rows) * 20 (columns) * 4 bytes (float) = 800 bytes.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *