Skip to content
tezvyn:

Top 30 Intermediate Mobile Dev Interview Questions and Answers

30 intermediate multiple-choice Mobile Dev interview questions, past the definitions: how the pieces fit together, what breaks in practice, and the trade-off behind a choice. They come from 30 bites in the Mobile Dev library, the middle slice of the 652 Mobile Dev interview questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

Mobile app development across platforms

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    Why does a 200ms synchronous data mapping on a React Native screen freeze interactive components like TouchableOpacity?

    Show the answer

    Answer: b · It monopolizes the JavaScript thread, so batched native updates and queued touch events cannot be processed.

    The correct answer recognizes that the JavaScript thread is blocked, preventing batched native updates and touch events from being handled. Option A is tempting because it confuses the JavaScript thread with the native UI main thread, which is the exact misconception the card highlights.

    Read the full bite: UI unresponsive during large data processing on main thread

  2. Question 2 of 30

    When accessing a property on a nullable object in Dart, what is the fundamental difference between using ?. and !?

    Show the answer

    Answer: c · ?. evaluates to null when the receiver is null, while ! casts to non-nullable and may throw at runtime.

    The null-aware operator ?. short-circuits and yields null if the receiver is null, whereas ! forcibly casts away nullability and throws a runtime exception if the value is actually null. Option D is wrong because it confuses ?. with the ?? default-value operator and incorrectly suggests ! is compile-time safe.

    Read the full bite: Describe Dart's null-aware ?. and null assertion ! operators

  3. Question 3 of 30

    If a class has a member function and an extension function is defined with the same signature, which one will be invoked when called on an instance of that class?

    Show the answer

    Answer: b · The member function, because member functions always take precedence.

    When a member function and an extension function have the same signature, the member function will always be chosen. This is because extension functions are resolved statically and do not override class members, making the member function the more specific choice.

    Read the full bite: What is a Kotlin extension function? Write one for String.

  4. Question 4 of 30

    Which statement accurately describes the underlying mechanism of Kotlin extension functions?

    Show the answer

    Answer: c · They are compiled into static utility methods where the receiver object is passed as the first parameter.

    The card explicitly states that extension functions are "syntactic sugar for static utility methods" and are "compiled down to static methods that take the receiver object as the first argument." They do not modify the original class or its bytecode, which is a common misconception.

    Read the full bite: What is a Kotlin extension function? Write one for String.

  5. Question 5 of 30

    Which statement accurately describes how Kotlin resolves an extension function call on a receiver?

    Show the answer

    Answer: c · It uses the compile-time declared type of the receiver, compiling down to a static method call

    Kotlin extension functions are resolved at compile time based on the declared receiver type and compile to static methods, not real class members. Option D is tempting because it mirrors true polymorphic dispatch, but extensions are statically dispatched and cannot be overridden.

    Read the full bite: What is an extension function? Write a hasWhitespace extension for String.

  6. Question 6 of 30

    When designing a Swift data model that requires independent undo snapshots without retroactive mutation, why is a struct preferred over a class?

    Show the answer

    Answer: c · Because assignment creates a unique copy, preventing shared references from mutating prior snapshots.

    Structs are value types, so each assignment copies the instance and prior snapshots remain independent. Option D is a common misconception because structs are not guaranteed to be stack-allocated, and option A is wrong since structs do not support inheritance.

    Read the full bite: Explain the primary differences between a struct and a class in Swift

  7. Question 7 of 30

    When working with immutable state in Kotlin, which generated function of a data class is specifically designed to create a new object instance with modified properties without altering the original?

    Show the answer

    Answer: b · copy()

    The copy() function is specifically designed to create a new instance of the data class, allowing certain properties to be modified while leaving the original object unchanged, which is crucial for immutable state management. The other generated functions serve different purposes like comparison, string representation, or hash generation, not for creating modified copies.

    Read the full bite: What are the advantages of a Kotlin data class and its functions?

  8. Question 8 of 30

    When managing immutable state with a data class, what is the primary role of the generated `copy()` function?

    Show the answer

    Answer: b · To create a new, modified instance of the object, leaving the original unchanged.

    The `copy()` function is central to working with immutable objects; it creates a new instance with specified changes, leaving the original untouched. Option A is a critical misunderstanding, as `copy()` never mutates the original object, which is key to predictable state management.

    Read the full bite: What are the advantages of a Kotlin data class?

  9. Question 9 of 30

    When using a Kotlin data class as a key in a HashMap, which statement about its compiler-generated behavior is true?

    Show the answer

    Answer: b · Only properties defined in the primary constructor marked as val or var are used in generated equals and hashCode, so the key remains consistent in the map.

    The compiler only incorporates primary constructor properties marked val or var into generated equals and hashCode, guaranteeing the contractual consistency required for safe use as a HashMap key. Option C is a tempting distractor because developers often assume body properties participate in structural equality, but the compiler intentionally excludes them.

    Read the full bite: What are the primary advantages of using a data class?

  10. Question 10 of 30

    A class declares late final UserService repo and assigns it in initState. What happens if repo is read in build before that assignment?

    Show the answer

    Answer: a · A LateInitializationError is thrown at the point of access

    late shifts definite-assignment checks from compile time to runtime, so accessing the field before assignment throws LateInitializationError. Distractor C is tempting because that is exactly the compile-time error you would receive if the field were not marked late.

    Read the full bite: What problem does late solve in Dart?

  11. Question 11 of 30

    An Android Fragment needs a property for a complex, computationally expensive object that is only used in certain user flows. The object should be created only once. Which declaration is most appropriate?

    Show the answer

    Answer: b · private val myObject: MyObject by lazy { createExpensiveObject() }

    `val by lazy` is ideal for expensive, immutable properties because it defers creation until first access and caches the result. `lateinit var` is incorrect because the property is immutable and is meant for when an external framework provides the value, not for deferred computation.

    Read the full bite: lateinit var vs. val by lazy in Android

  12. Question 12 of 30

    Which statement accurately describes a fundamental difference between lateinit var and val by lazy in Kotlin?

    Show the answer

    Answer: b · val by lazy can initialize properties of any type, including primitives, unlike lateinit var.

    The card states that lateinit var cannot be used for primitive types like Int or Boolean, while val by lazy has no such restriction. Option A is incorrect because it describes the behavior of val by lazy, not lateinit var, which is initialized manually.

    Read the full bite: lateinit var vs. val by lazy in Android

  13. Question 13 of 30

    In an Activity, a property holds a ViewModel obtained via ViewModelProvider in onCreate. Why is lateinit var more suitable than val by lazy?

    Show the answer

    Answer: c · lateinit var allows imperative assignment and can be reassigned if the Activity is recreated

    lateinit var is designed for mutable properties assigned imperatively in lifecycle callbacks like onCreate and can be reassigned when the Activity is recreated, whereas val by lazy is immutable and self-initializing. Option D is tempting but wrong because it describes lazy's first-access caching behavior, not lateinit's imperative assignment model.

    Read the full bite: Explain lateinit var versus val by lazy in Android

  14. Question 14 of 30

    Given List<int> nums = [1, 2, 3, 4] and bool includeZero = true, which literal produces [0, 2, 4]?

    Show the answer

    Answer: a · [if (includeZero) 0, for (var n in nums) if (n.isEven) n]

    Option A correctly uses collection-if to prepend 0 and collection-for with a nested collection-if to filter evens inside one literal. Option B is tempting because where looks declarative, but without the spread operator it inserts the Iterable object itself as a single element rather than flattening its contents.

    Read the full bite: How do you use collection-if and collection-for to declaratively build a list?

  15. Question 15 of 30

    What core characteristic of Kotlin's function handling makes higher-order functions possible?

    Show the answer

    Answer: b · The treatment of functions as first-class citizens, allowing them to be passed as arguments or returned.

    The card explicitly states that higher-order functions are possible "because Kotlin treats functions as first-class citizens, meaning they can be stored in variables or passed as arguments." This fundamental concept allows functions to be used as parameters or return values. While type inference is a useful Kotlin feature, it does not enable the core mechanism of functions being treated as first-class entities.

    Read the full bite: Explain and implement a Kotlin higher-order function

  16. Question 16 of 30

    Which statement accurately describes how Dart closures handle captured variables from an enclosing function?

    Show the answer

    Answer: d · They capture the variable binding by reference in a heap-allocated environment

    Dart closures capture the variable binding by reference in the heap, so the inner function retains access even after the outer function returns and its stack frame is popped. This makes B incorrect because the enclosing function's stack frame does not remain on the call stack after it returns.

    Read the full bite: What is a Dart closure? Write a function that returns a function.

  17. Question 17 of 30

    In Kotlin, what is the defining characteristic that makes a function a 'higher-order function'?

    Show the answer

    Answer: b · It accepts a function as an argument or returns a function as its result.

    The correct answer is right because the definition of a higher-order function is one that treats functions as first-class citizens by taking them as parameters or returning them. While many higher-order functions operate on collections (a tempting distractor), this is a common use case, not the defining property.

    Read the full bite: Explain and implement a higher-order function in Kotlin

  18. Question 18 of 30

    What distinguishes filterAndTransform as a higher-order function rather than merely a generic function in Kotlin?

    Show the answer

    Answer: d · It takes other functions as arguments, such as predicate and transform

    A higher-order function must accept or return a function, so taking predicate and transform as arguments makes it one. Option C describes generics, which alone do not make a function higher-order.

    Read the full bite: Explain higher-order functions and implement filterAndTransform

  19. Question 19 of 30

    In React Native, what is the default flexDirection, and how does it compare to the web?

    Show the answer

    Answer: d · Default is column, which differs from the web's default of row

    React Native defaults flexDirection to column, so children stack vertically, whereas standard CSS on the web defaults to row. The other options misstate both the React Native default and the web comparison.

    Read the full bite: Default flexDirection and header-content-footer layout

  20. Question 20 of 30

    For a parent View with flexDirection column, which statement about alignItems and justifyContent is correct?

    Show the answer

    Answer: a · justifyContent aligns children along the vertical main axis and alignItems along the horizontal cross axis

    With column direction the main axis is vertical, so justifyContent governs vertical placement and alignItems governs the horizontal cross axis. The horizontal-versus-vertical labeling in the first option is the common mistake that only holds for row layouts.

    Read the full bite: alignItems vs justifyContent in flexbox

  21. Question 21 of 30

    When you set position absolute on a child View in React Native, relative to what are its top and left offsets measured?

    Show the answer

    Answer: a · Its nearest positioned ancestor, typically the parent View

    Absolute offsets are measured against the nearest positioned ancestor, usually the parent View, not the whole screen. React Native also has no position fixed, which is why screen-relative positioning is not the default behavior.

    Read the full bite: Using position absolute in React Native

  22. Question 22 of 30

    Why does a stored closure property that references self inside its body cause a memory leak under ARC?

    Show the answer

    Answer: a · Because the instance holds the closure strongly while the closure captures self strongly, preventing deallocation

    The correct answer describes the mutual strong reference that prevents ARC from zeroing out either reference. Option D is a tempting distractor because it plays on the common misconception that closures might be value types, but they are reference types that strongly capture self by default.

    Read the full bite: What is a retain cycle in ARC with closures?

  23. Question 23 of 30

    To render a View as a perfect circle of width and height 80 with centered text, which combination is correct?

    Show the answer

    Answer: d · borderRadius 40 with justifyContent center and alignItems center on the parent

    A circle needs borderRadius equal to half the equal width and height (40 for an 80 box), and centering on both axes requires both justifyContent and alignItems set to center. Using only one alignment leaves the text off-center on the other axis.

    Read the full bite: Circular View with centered text

  24. Question 24 of 30

    When writing a swap function in Swift, what advantage does using a generic placeholder T provide over accepting parameters of type Any?

    Show the answer

    Answer: d · Generics enforce that both parameters are the same concrete type and avoid runtime casting

    Generics preserve compile-time type information, ensuring both arguments share the same type and eliminating unsafe downcasting. Distractor A is tempting because Any permits heterogeneous values, but a generic swap<T> explicitly prevents mixing types, which is exactly why it is type-safe.

    Read the full bite: What are Swift generics, why useful, and write a swap function?

  25. Question 25 of 30

    Which condition justifies using [unowned self] instead of [weak self] in a Swift closure?

    Show the answer

    Answer: a · The closure is owned by the instance and guaranteed not to execute after deallocation

    [unowned self] is only safe when the closure and instance share identical lifetimes, such as when the instance owns the closure and it cannot execute after deallocation. Option B is tempting because network handlers are common, but they require [weak self] since the user can dismiss the view controller before the response arrives, making unowned unsafe.

    Read the full bite: What is a closure capture list? Explain [weak self] versus [unowned self].

  26. Question 26 of 30

    Which behavior correctly describes exception propagation for a coroutine launched with launch inside a regular Job scope?

    Show the answer

    Answer: c · The exception propagates to the parent, which cancels siblings and fails the scope.

    Under a regular Job, a failing child propagates its exception upward, causing the parent to cancel all siblings and fail the scope. Distractor D describes SupervisorJob behavior, which must be explicitly used to prevent sibling cancellation.

    Read the full bite: How does Structured Concurrency handle cancellations and exceptions?

  27. Question 27 of 30

    Which statement accurately contrasts Dart's extends, implements, and with keywords for class reuse?

    Show the answer

    Answer: a · extends inherits from one superclass; implements requires reimplementing every public member; with injects behavior without subtyping.

    Option A is correct because extends provides single inheritance of implementation, implements forces the class to reimplement every public member itself, and with injects reusable behavior without creating an is-a relationship. Option B is wrong because extends does not allow multiple superclasses, implements does not reuse parent code, and with does not establish an is-a inheritance chain.

    Read the full bite: What are the key differences between Dart extends, implements, and with?

  28. Question 28 of 30

    In a standard CoroutineScope, if one child coroutine fails with an exception, what is the immediate effect on its siblings and the parent scope?

    Show the answer

    Answer: b · The failing coroutine cancels its siblings, and the exception then propagates up to cancel the parent scope.

    Structured concurrency with a standard Job follows an 'all-for-one' policy. An uncaught exception in one child cancels its siblings and then propagates to the parent, cancelling the entire scope. The behavior where siblings continue running is characteristic of a SupervisorJob.

    Read the full bite: Structured Concurrency in Kotlin Coroutines

  29. Question 29 of 30

    In Kotlin's Structured Concurrency, what is the default outcome if one child coroutine launched with launch throws an uncaught exception?

    Show the answer

    Answer: b · The parent scope and all its sibling coroutines are immediately cancelled.

    With a default Job, an uncaught exception in a child coroutine launched with 'launch' propagates up, cancelling the parent scope and all its other children, ensuring a "fail-fast" system. Option A is incorrect because the default behavior is not to isolate failures but to propagate them, unlike with a SupervisorJob.

    Read the full bite: Explain Structured Concurrency in Kotlin Coroutines

  30. Question 30 of 30

    Which statement accurately describes a semantic difference between a Dart factory constructor and a generative constructor?

    Show the answer

    Answer: c · A factory constructor can return an existing cached instance or a subtype, while a generative constructor always produces a fresh instance of the exact class.

    A factory constructor is not required to create a new instance and may return a cached object or subtype, whereas a generative constructor always allocates a fresh instance of the exact class. Option B is tempting because factories resemble static methods, but they remain part of the constructor namespace and are called with standard constructor syntax.

    Read the full bite: What is a Dart factory constructor and common use cases?

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon