Vidyalelo
Computer Science · Q233

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 233

Q233

Which is the correct declaration of an integer array with a size of 5?

A.
val arrs[5]: Int
B.
val arrs = IntArray(5)
Answer
C.
val arrs: Int[5]
D.
val arrs = Array<Int>(5)

Answer: Option B

Solution

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