Control Flow interview questions

12 real Control Flow questions from the Kotlin bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is when expression?

Junior
  1. A.the use of a conditional that yields a value directly, removing the need for a ternary operator
  2. B.a multi-branch construct that returns a value and can replace a chain of conditional checks
  3. C.a progression of values created with the dotted operator and commonly iterated in a loop
  4. D.the requirement that every possible case of a sealed type or enum be handled when the result is used
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.when expression — the requirement that every possible case of a sealed type or enum be handled when the result is used
  2. B.when expression — a progression of values created with the dotted operator and commonly iterated in a loop
  3. C.when expression — the use of a conditional that yields a value directly, removing the need for a ternary operator
  4. D.when expression — a multi-branch construct that returns a value and can replace a chain of conditional checks
Reveal the answer + AI explanation — free account

4. What is Range?

Junior
  1. A.the use of a conditional that yields a value directly, removing the need for a ternary operator
  2. B.the requirement that every possible case of a sealed type or enum be handled when the result is used
  3. C.a progression of values created with the dotted operator and commonly iterated in a loop
  4. D.a multi-branch construct that returns a value and can replace a chain of conditional checks
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.Range — the requirement that every possible case of a sealed type or enum be handled when the result is used
  2. B.Range — a progression of values created with the dotted operator and commonly iterated in a loop
  3. C.Range — the use of a conditional that yields a value directly, removing the need for a ternary operator
  4. D.Range — a multi-branch construct that returns a value and can replace a chain of conditional checks
Reveal the answer + AI explanation — free account

7. What is if as expression?

Junior
  1. A.a multi-branch construct that returns a value and can replace a chain of conditional checks
  2. B.the use of a conditional that yields a value directly, removing the need for a ternary operator
  3. C.a progression of values created with the dotted operator and commonly iterated in a loop
  4. D.the requirement that every possible case of a sealed type or enum be handled when the result is used
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Junior
  1. A.if as expression — a multi-branch construct that returns a value and can replace a chain of conditional checks
  2. B.if as expression — the use of a conditional that yields a value directly, removing the need for a ternary operator
  3. C.if as expression — the requirement that every possible case of a sealed type or enum be handled when the result is used
  4. D.if as expression — a progression of values created with the dotted operator and commonly iterated in a loop
Reveal the answer + AI explanation — free account

10. What is Exhaustive branching?

Mid
  1. A.the use of a conditional that yields a value directly, removing the need for a ternary operator
  2. B.the requirement that every possible case of a sealed type or enum be handled when the result is used
  3. C.a multi-branch construct that returns a value and can replace a chain of conditional checks
  4. D.a progression of values created with the dotted operator and commonly iterated in a loop
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.Exhaustive branching — a multi-branch construct that returns a value and can replace a chain of conditional checks
  2. B.Exhaustive branching — a progression of values created with the dotted operator and commonly iterated in a loop
  3. C.Exhaustive branching — the requirement that every possible case of a sealed type or enum be handled when the result is used
  4. D.Exhaustive branching — the use of a conditional that yields a value directly, removing the need for a ternary operator
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Control Flow free