Practice high-yield Computer Science & IT MCQs on Kotlin Program — Part 2 with worked academic solutions for PPSC, FPSC, CSS, PMS, NTS.
Questions
40
Difficulty Level
Exam-Level
Target Exams
PPSC, FPSC, CSS...
Estimated Time
48 mins
Exam-Level PPSC FPSC CSS PMS NTS
Verified for Commission Syllabus • Oct 14, 2026
40
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress|0/40 answered
✓0 correct
✗0 wrong
0% score
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What are lambdas in Kotlin?
Correct Answer: Option D — A lambda is an expression that describes a function. But instead of declaring a named function, you declare a function that has no name
Detailed Academic Explanation:
A lambda is an expression that describes a function. But instead of declaring a named function, you declare a function that has no name is the correct answer to “What are lambdas in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 2 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the when expression in Kotlin?
Correct Answer: Option B — To perform pattern matching on an expression
Detailed Academic Explanation:
To perform pattern matching on an expression is the correct answer to “What is the purpose of the when expression in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 3 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the with function in Kotlin?
Correct Answer: Option B — To apply a block of code to an object
Detailed Academic Explanation:
To apply a block of code to an object is the correct answer to “What is the purpose of the with function in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 4 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the apply function in Kotlin?
Correct Answer: Option B — To apply a block of code to an object and return the object
Detailed Academic Explanation:
To apply a block of code to an object and return the object is the correct answer to “What is the purpose of the apply function in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 5 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Does Kotlin enable macros?
Correct Answer: Option B — FALSE
Detailed Academic Explanation:
FALSE is the correct answer to “Does Kotlin enable macros”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 6 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the Elvis operator in Kotlin?
Correct Answer: Option A — To assign a default value to a nullable variable if null
Detailed Academic Explanation:
To assign a default value to a nullable variable if null is the correct answer to “What is the purpose of the Elvis operator in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 7 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the lateinit keyword in Kotlin?
Correct Answer: Option B — To declare a variable that must be initialized before use
Detailed Academic Explanation:
To declare a variable that must be initialized before use is the correct answer to “What is the purpose of the lateinit keyword in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 8 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is true about Kotlin?
Correct Answer: Option B — It is an object-oriented programming language
Detailed Academic Explanation:
It is an object-oriented programming language is the correct answer to “Which of the following is true about Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 9 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the main advantage of using Kotlin over Java?
Correct Answer: Option C — More concise syntax
Detailed Academic Explanation:
More concise syntax is the correct answer to “What is the main advantage of using Kotlin over Java”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 10 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
In Kotlin, it is possible to inherit class properties and functions from one class to another.
Correct Answer: Option B — True
Detailed Academic Explanation:
True is the correct answer to “In Kotlin, it is possible to inherit class properties and functions from one class to another.”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 11 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is a feature of Kotlin?
Correct Answer: Option C — Extension functions
Detailed Academic Explanation:
Extension functions is the correct answer to “Which of the following is a feature of Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 12 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is true about Kotlin's null safety?
Correct Answer: Option C — Kotlin uses the ? operator to denote nullability
Detailed Academic Explanation:
Kotlin uses the ? operator to denote nullability is the correct answer to “Which of the following is true about Kotlin's null safety”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 13 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is true about Kotlin's type system?
Correct Answer: Option B — Kotlin's type system is more strict than Java's
Detailed Academic Explanation:
Kotlin's type system is more strict than Java's is the correct answer to “Which of the following is true about Kotlin's type system”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 14 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is true about Kotlin's when expression?
Correct Answer: Option A — It is similar to the switch statement in Java
Detailed Academic Explanation:
It is similar to the switch statement in Java is the correct answer to “Which of the following is true about Kotlin's when expression”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 15 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How can we write a multi-line comment in Kotlin?
Correct Answer: Option A — /* Comment */
Detailed Academic Explanation:
/* Comment */ is the correct answer to “How can we write a multi-line comment in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 16 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the let() function in Kotlin?
Correct Answer: Option D — To perform a null-check and execute code only if the value is not null
Detailed Academic Explanation:
To perform a null-check and execute code only if the value is not null is the correct answer to “What is the purpose of the let() function in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 17 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
In Kotlin, code statements must end with a semicolon (;)
Correct Answer: Option B — FALSE
Detailed Academic Explanation:
FALSE is the correct answer to “In Kotlin, code statements must end with a semicolon (;)”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 18 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is true about Kotlin's data classes?
Correct Answer: Option D — They must implement the equals() and hashCode() methods
Detailed Academic Explanation:
They must implement the equals() and hashCode() methods is the correct answer to “Which of the following is true about Kotlin's data classes”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 19 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the inline keyword in Kotlin?
Correct Answer: Option C — To allow a function to be inlined at the call site
Detailed Academic Explanation:
To allow a function to be inlined at the call site is the correct answer to “What is the purpose of the inline keyword in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 20 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the default inheritance of classes in Kotlin?
Correct Answer: Option A — final
Detailed Academic Explanation:
final is the correct answer to “What is the default inheritance of classes in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 21 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Identify the bits allocated in Kotlin for Float data type
Correct Answer: Option A — 32
Detailed Academic Explanation:
32 is the correct answer to “Identify the bits allocated in Kotlin for Float data type”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 22 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The Kotlin code can be implemented without JVM?
Correct Answer: Option A — TRUE
Detailed Academic Explanation:
TRUE is the correct answer to “The Kotlin code can be implemented without JVM”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 23 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Array indexes start with:
Correct Answer: Option B — 0
Detailed Academic Explanation:
0 is the correct answer to “Array indexes start with:”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 24 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What paradigm(s) does the Kotlin programming language follow?
Correct Answer: Option D — Both Object-Oriented and Functional
Detailed Academic Explanation:
Both Object-Oriented and Functional is the correct answer to “What paradigm(s) does the Kotlin programming language follow”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 25 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How do you define a variable in Kotlin that cannot be reassigned?
Correct Answer: Option B — val
Detailed Academic Explanation:
val is the correct answer to “How do you define a variable in Kotlin that cannot be reassigned”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 26 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the when expression used in Kotlin?
Correct Answer: Option B — To define a switch-case statement
Detailed Academic Explanation:
To define a switch-case statement is the correct answer to “What is the when expression used in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 27 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What does ?. operator do in Kotlin?
Correct Answer: Option C — Null-safe member access
Detailed Academic Explanation:
Null-safe member access is the correct answer to “What does ?. operator do in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 28 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The value of a string variable must be surrounded by single quotes.
Correct Answer: Option A — False
Detailed Academic Explanation:
False is the correct answer to “The value of a string variable must be surrounded by single quotes.”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 29 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the default visibility modifier for functions in Kotlin?
Correct Answer: Option A — public
Detailed Academic Explanation:
public is the correct answer to “What is the default visibility modifier for functions in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 30 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which keyword is used to create a singleton in Kotlin?
Correct Answer: Option D — object
Detailed Academic Explanation:
object is the correct answer to “Which keyword is used to create a singleton in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 31 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the main purpose of the let function in Kotlin?
Correct Answer: Option C — To transform an object
Detailed Academic Explanation:
To transform an object is the correct answer to “What is the main purpose of the let function in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 32 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the purpose of the open modifier in Kotlin?
Correct Answer: Option B — It makes a function available for overriding.
Detailed Academic Explanation:
It makes a function available for overriding. is the correct answer to “What is the purpose of the open modifier in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 33 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which Kotlin construct allows a block of code to be executed a specific number of times?
Correct Answer: Option C — repeat
Detailed Academic Explanation:
repeat is the correct answer to “Which Kotlin construct allows a block of code to be executed a specific number of times”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 34 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which keywords are used to handle conditional statements in Kotlin?
Correct Answer: Option C — Both A and B
Detailed Academic Explanation:
Both A and B is the correct answer to “Which keywords are used to handle conditional statements in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 35 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
In Kotlin, what is the main purpose of the return keyword?
Correct Answer: Option C — To terminate a function execution and return a value
Detailed Academic Explanation:
To terminate a function execution and return a value is the correct answer to “In Kotlin, what is the main purpose of the return keyword”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 36 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the primary use of the with function in Kotlin?
Correct Answer: Option C — To establish a scope in which an object's properties and functions can be accessed directly without specifying the object's name
Detailed Academic Explanation:
To establish a scope in which an object's properties and functions can be accessed directly without specifying the object's name is the correct answer to “What is the primary use of the with function in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 37 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of these is not a loop structure in Kotlin?
Correct Answer: Option C — until loop
Detailed Academic Explanation:
until loop is the correct answer to “Which of these is not a loop structure in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 38 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What methods can be used to achieve abstraction in Kotlin?
Correct Answer: Option C — Through both abstract classes and interfaces
Detailed Academic Explanation:
Through both abstract classes and interfaces is the correct answer to “What methods can be used to achieve abstraction in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 39 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is not a basic data type in Kotlin?
Correct Answer: Option B — String
Detailed Academic Explanation:
String is the correct answer to “Which of the following is not a basic data type in Kotlin”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
Question 40 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which property can be used to find the length of a string?
Correct Answer: Option B — length
Detailed Academic Explanation:
length is the correct answer to “Which property can be used to find the length of a string”. This question is standard in competitive examination syllabi for Kotlin Program.
💡Key Conceptual Anchor:Kotlin Program
✓Link copied to clipboard
Continue Your Practice
Advanced Mapreduce Concepts — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.