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.
Loading...
Related Quiz
- In C, ______ is the standard error output stream.
- An enumeration is a user-defined data type that consists of integral ________.
- How does the strtok() function work in C?
- What is the primary disadvantage of using dynamic memory allocation for arrays in C?
- What is the lifetime of a static variable in a C program?