An error is generated when you try to compile the following code. How should you change the call to printStudents to fix the error?kotlinfun main() { val students = arrayOf('Abel', 'Bill', 'Cindy', 'Darla') printStudents(students)}fun printStudents(vararg students: String) { for(student in students) println(student)}

🎲 Try a Random Question  |  Total Questions in Quiz: 83  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Kotlin Quiz — practice the complete quiz, review flashcards, or try a random question.

Kotlin MCQs For LinkedIn Skill Assessments.


An error is generated when you try to compile the following code. How should you change the call to printStudents to fix the error?<br>kotlin<br>fun main() {<br> val students = arrayOf('Abel', 'Bill', 'Cindy', 'Darla')<br> printStudents(students)<br>}<br>fun printStudents(vararg students: String) {<br> for(student in students) println(student)<br>}<br>