Accenture Primer
Accenture DumpmediumAccenture PrimerArrays

Assume you have an array named numbers of size 10. Which of the assignment is valid?

Answer options

A
numbers[10] <- 11
B
numbers[9] <- 5
C
numbers[0] <- 10
D
numbers[11] <- 6
E
array index starts from 0 to 9, for 10 elements. Assigning values to numbers[10],numbers[11] is not valid, since the index exceeds the
F
size of array resulting in unpredictable results

Correct answer: numbers[9] <- 5, numbers[0] <- 10

Explanation

The source marks the correct answer as: numbers[0] <- 10; numbers[9] <- 5.

Related Accenture Accenture Primer questions

Practice more Accenture Accenture Primer questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.