Vidyalelo
Computer Science · Q279

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 279

Q279

You have two arrays, a and b. Which line combines a and b as a list containing the contents of both? val a = arrayOf(1, 2, 3) val b = arrayOf(100, 200, 3000)

A.
Val c = list of (a, b)
B.
Val c = a + b
C.
Delegates.observer()
D.
Val c = listOf(*a, *b)
Answer

Answer: Option D

Solution

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