42.
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?

45.
You are writing a console app in Kotlin that processes test entered by the user. If the user enters an empty string, the program exits. Which kind of loop would work best for this app? Keep in mind that the loop is entered at least once

46.
You are attempting to assign an integer variable to a long variable, but Kotlin compiler flags it as an error. Why?

47.
Which line of code shows how to display a nullable string's length and shows 0 instead of null?

48.
Kotlin interfaces and abstract classes are very similar. What is one thing abstract class can do that interfaces cannot?

49.
Inside an extension function, what is the name of the variable that corresponds to the receiver object

Read More Section(Kotlin Program)

Each Section contains maximum 100 MCQs question on Kotlin Program. To get more questions visit other sections.