Vidyalelo
Computer Science · Q142

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 142

Q142

The function typeChecker receiver a parameter obj of type Any. Based upon the type of obj, it prints different messages for Int, String, Double, and Float types; if not any of the mentioned types, it prints "unknown type". What operator allows you to determine the type of an object?

A.
instanceof
B.
is
Answer
C.
typeof
D.
assign()

Answer: Option B

Solution

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