Question:

Consider the following statements about arrays. Which of the following are TRUE? 

A. The index specifies an offset from the beginning of the array to the element being referenced. 
B. Declaring an array means specifying three parameters; data type, name, and its size. 
C. The length of an array is given by the number of elements stored in it. 
D. The name of an array is a symbolic reference to the address of the first byte of the array. 
Choose the correct answer from the options given below:

Show Hint

In arrays, the name acts as a pointer to the base address, and the index helps in accessing specific elements relative to that base.
Updated On: Sep 25, 2025
  • A, B and C only
  • A, B and C only
  • B, D and A only
  • A, B, C and D
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Evaluate each statement. 
- **A:** "The index specifies an offset from the beginning of the array to the element being referenced." This is true. In an array, the index is used to calculate the memory location of an element relative to the beginning of the array. 

- **B:** "Declaring an array means specifying three parameters; data type, name, and its size." This is true. When you declare an array in most programming languages, you need to specify the data type, the array name, and the size of the array (the number of elements it can store). 

- **C:** "The length of an array is given by the number of elements stored in it." This is true. The length of an array refers to the number of elements it holds. 

- **D:** "The name of an array is a symbolic reference to the address of the first byte of the array." This is true. The name of the array typically refers to the base address, which is the memory location of the first element (or byte) of the array.

Step 2: Conclusion. 
All the statements are true, so the correct answer is option (4) A, B, C and D.

Was this answer helpful?
0
0

Questions Asked in CUET PG exam

View More Questions