What is the relationship between the addresses of consecutive elements in a one-dimensional array?
- Addresses are assigned based on the element's value
- Addresses are the same for all elements
- Consecutive elements have addresses in random order
- Consecutive elements have consecutive addresses
In a one-dimensional array, consecutive elements have consecutive addresses. The address of each element is one unit (e.g., byte) greater than the previous element.
Loading...
Related Quiz
- What is the role of pointers in relation to structures in C?
- Imagine you are developing a C program to manage a library's book inventory. What data structure would be beneficial for storing information about each book?
- The strlen function returns the length of a string, excluding the ________.
- In a recursive function, if the base case is not properly defined, it can lead to a ________.
- What is the purpose of the 'sizeof' operator in C?