Vidyalelo
Computer Science · Q46

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 46

Q46

What is the purpose of the Elvis operator in Kotlin?

A.
To assign a default value to a nullable variable if null
Answer
B.
To assign a default value to a non-nullable variable if null
C.
To concatenate two strings
D.
To perform arithmetic operations

Answer: Option A

Solution

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