Vidyalelo
Computer Science · Q225

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 225

Q225

How do you declare an array of integers in Kotlin?

A.
val numbers = arrayOf(1, 2, 3)
Answer
B.
val numbers = listOf(1, 2, 3)
C.
val numbers = [1, 2, 3]
D.
val numbers = Array(3) {0, 1, 2}

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board