Mobile App Developer Online Assessment (50 Questions)

kmp developer interview questions

As a Kotlin/KMP developer while searching a new job we need to be prepare for online assessment test as lots of companies take this online test to find most capable developers. Although you know lots of things about mobile app development if you don’t have preparation and don’t know what type of questions you are going to face then it will be tough to pass the assessment.

Below 50 questions will help to you to understand about question pattern and also basic preparation for your next online assessment.

[✅ answers are correct answers]

Sections:

Android (Kotlin + Compose) — 15 questions
iOS (Swift + SwiftUI) — 10 questions
Kotlin Multiplatform — 10 questions
Algorithms & DS — 10 questions
General Software Engineering — 5 questions

Section 1 – ANDROID (Kotlin + Compose)

1. What will be the output?

val list = listOf(1, 2, 3)

println(list.map { it * 2 }.filter { it > 2 })

A. [2,4,6]
B. [4,6] ✅
C. [6]
D. [2]


2. Which coroutine builder returns a Deferred?

A. launch
B. async ✅
C. withContext
D. flow


3. StateFlow is:

A. Cold
B. Hot ✅
C. Relays nothing
D. Lifecycle-aware


4. Best way to launch coroutines in ViewModel?

A. GlobalScope.launch
B. CoroutineScope(IO).launch
C. viewModelScope.launch ✅
D. runBlocking


5. What does remember { } do in Compose?

A. Stores value across app restarts
B. Stores value across recompositions ✅
C. Disables recomposition
D. Saves to SharedPreferences


6. Jetpack Compose uses which programming paradigm?

A. Imperative UI
B. Declarative UI ✅
C. Reactive Streams only
D. XML-driven UI


7. Which class is lifecycle-aware?

A. CoroutineScope()
B. GlobalScope
C. lifecycleScope ✅
D. Thread


8. What will this print?

var x = 5

x = x++ + ++x

println(x)

A. 11
B. 12 ✅
C. 13
D. Undefined


9. What is suspend keyword used for?

A. Make function static
B. Enable blocking IO
C. Allow function to pause/resume ✅
D. Enable parallel threads


10. Which is true about Flow?

A. Flow is hot
B. Flow is cold ✅
C. Flow needs no collector
D. Flow automatically runs on IO


11. In Room, DAO functions must be:

A. inline
B. open
C. abstract or interface methods ✅
D. data


12. Recommended DB for KMP + Android?

A. Room
B. Realm
C. SQLDelight ✅
D. Firestore


13. What will happen?

lateinit var name: String

println(name)

A. prints “”
B. null
C. Crash: UninitializedPropertyAccessException ✅
D. Compile error


14. What does @Composable annotate?

A. lifecycle methods
B. XML layouts
C. UI functions ✅
D. Room entities


15. Purpose of key() in LazyColumn?

A. Improve animations
B. Avoid full recomposition
C. Avoid item state loss ✅
D. Prevent scrolling



Section 2 — iOS (SWIFT + SWIFTUI)

16. Output?

var a = 10

let f = { a += 5 }

f()

print(a)

A. 10
B. 5
C. 15 ✅
D. Runtime error


17. What is @State used for?

A. Global data
B. Local mutable view data ✅
C. Shared data between views
D. Network calls


18. ARC cannot free memory when?

A. Object has strong cycle ✅
B. Weak reference
C. Strong to weak
D. No references exist


19. Which is async networking?

A. FoundationDB
B. Alamofire ✅
C. XCTest
D. CoreML


20. Output?

let arr = [1,2,3]

print(arr.filter { $0 > 1 }.map { $0 * 2 })

A. [4,6] ✅
B. [2]
C. [6]
D. []


21. weak var delegate is used to avoid:

A. Crashes
B. Memory leaks ✅
C. Reallocation
D. Optionals


22. SwiftUI is…

A. Imperative
B. Declarative ✅
C. Storyboard-only
D. UIKit-only


23. @ObservedObject requires:

A. ObservableObject + @Published ✅
B. Any struct
C. Global variable
D. UIKit delegate


24. Which is thread-safe?

A. UIKit
B. SwiftUI View updates
C. CoreData default
D. DispatchQueue.main ✅


25. Combine publisher type for UI updates?

A. Just
B. PassthroughSubject
C. CurrentValueSubject ✅
D. Future



Section 3 – Kotlin Multiplatform (KMP)

26. What code is shared in KMP?

A. UI
B. SQLDelight DB ✅
C. Jetpack Compose UI
D. SwiftUI


27. expect/actual means:

A. Two versions required ✅
B. Only Android implements
C. Only iOS implements
D. Optional implementation


28. Which plugin enables KMP?

A. kotlin("jvm")
B. kotlin("multiplatform") ✅
C. kotlin("android")
D. kotlin("native")


29. Common module cannot use:

A. Kotlin std-lib
B. Coroutines
C. SQLDelight
D. Android Context ✅


30. Ktor works in shared module because:

A. JNI
B. Multiplatform support ✅
C. JVM-only API
D. Swift bridges


31. Recommended JSON library for KMP?

A. Gson
B. Moshi
C. kotlinx.serialization ✅
D. Jackson


32. KMP shared code is written in:

A. Obj-C
B. Swift
C. Kotlin ✅
D. Both Swift & Kotlin


33. What produces .framework for iOS?

A. JVM target
B. JS target
C. iOS target ✅
D. wasm target


34. SQLDelight generates:

A. Swift classes only
B. Kotlin + Swift interfaces
C. Shared DB APIs ✅
D. Native-only code


35. @ThreadLocal is used because:

A. coroutines stop sharing state
B. iOS does not allow shared mutable state ✅
C. Swift cannot see Kotlin fields
D. Android lifecycle



Section 4 — ALGORITHMS & DSA

36. Complexity of binary search?

A. O(n)
B. O(log n) ✅
C. O(n log n)
D. O(1)


37. This returns?

fun solve(a: IntArray): Int {

var max = a[0]

for (i in a.indices) if (a[i] > max) max = a[i]

return max

}

A. Min
B. Max ✅
C. Average
D. Wrong


38. Stack uses:

A. FIFO
B. LIFO ✅
C. Random
D. Key-value


39. Which sorting is O(n²)?

A. Merge sort
B. Quick sort
C. Bubble sort ✅
D. Heap sort


40. HashMap average lookup?

A. O(n)
B. O(1) ✅
C. O(log n)
D. O(n log n)


41. Queue uses:

A. LIFO
B. FIFO ✅
C. DFS
D. Hashing


42. Recursion requires:

A. Heap
B. Stack ✅
C. Both
D. Register


43. BFS uses:

A. Stack
B. Queue ✅
C. HashMap
D. Heap


44. Which is stable sorting?

A. Quick sort
B. Merge sort ✅
C. Heap sort
D. Tree sort


45. Output?

val a = arrayOf(1, 2, 3)

println(a[1])

A. 3
B. 1
C. 2 ✅
D. 0



Section 5 — SOFTWARE ENGINEERING / LOGIC

46. REST is:

A. Protocol
B. Architecture style ✅
C. Library
D. Standard


47. HTTP status 201 means:

A. OK
B. Bad request
C. Created ✅
D. No content


48. Git command to create branch?

A. git new branch
B. git branch ✅
C. git add branch
D. git switch -n


49. CI/CD stands for:

A. Continual Improvement, Code Delivery
B. Continuous Integration, Continuous Deployment ✅
C. Code Integration, Code Debugging
D. Continuous Input, Continuous Deletion


50. Unit tests should test:

A. UI Screens
B. Network latency
C. Single function behavior ✅
D. Entire app workflow

 

 

 Thank you | Happy Coding

 

 

 

 

 

 

X