Discussion Forum : Arrays And Hashes
Question - What will be the output of the following?array = [100, 200, 300, 400, 500]print array[5]
Options:
A .  400
B .  500
C .  Nil
D .  None of the mentioned
Answer: Option C


Array's index start from 0 so array[5] will give nothing.
Output:
Nil



Was this answer helpful ?
Next Question
Submit Your Solution hear:

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