Exam-style question
Try this first
Which of the following can be used as an index in an array?.
- A.Only integers
- B.Only strings
- C.Any data type
- D.Variables
Answer and explanation
Concise answer
Variables
Why this is correct
Variables can be used as indexes to dynamically access elements in an array.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
