Top 30 Intermediate Mobile Dev Concepts Quiz
30 intermediate multiple-choice Mobile Dev concept questions, the mechanics underneath the basics: how the pieces relate and where the usual mental model stops holding. They come from 30 bites in the Mobile Dev library, the middle slice of the 662 Mobile Dev concept 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.
Question 1 of 30
What is the fundamental mechanism by which Swift Optionals prevent runtime crashes from missing values?
Show the answer
Answer: d · They require explicit checks for nil values at compile time, making absence part of the type.
The card states Optionals make "the potential absence of a value an explicit part of its type system, forcing developers to handle the 'nil' case at compile time." This explicit handling prevents runtime crashes by ensuring nil is addressed before code execution. Force-unwrapping (option C) is explicitly mentioned as an anti-pattern that causes crashes if the value is nil, not prevents them.
Read the full bite: Swift Optionals: Handling Nothing Safely
Question 2 of 30
Which statement accurately describes Metro's primary role in a React Native project?
Show the answer
Answer: c · It compiles multiple JavaScript source files into a single, optimized bundle for execution.
Metro's core function is to act as a "specialized compiler" that takes numerous JavaScript files, resolves dependencies, transforms code, and combines them into a single, optimized bundle for efficient loading on devices. Option B describes a package manager, C describes native build tools, and D describes the React Native framework itself.
Read the full bite: Metro: The JavaScript Bundler for React Native
Question 3 of 30
When should a developer generally prefer using a Swift struct over a class for a new data type?
Show the answer
Answer: b · When the data is simple, self-contained, and changes to a copy should not affect the original.
Structs are value types, meaning they are copied on assignment, and changes to the copy do not affect the original. This makes them suitable for simple, self-contained data where independent copies are desired. Classes are used for shared identity and inheritance, and are managed by ARC.
Read the full bite: Swift Structs vs. Classes: Value vs. Reference Types
Question 4 of 30
You add a new case to a widely-used enum. When does this silently undermine compile-time safety?
Show the answer
Answer: b · When switches over the enum include a default clause
A default clause catches the new case automatically, so the compiler cannot force you to handle it explicitly. Omitting a default clause produces a build error for unhandled cases, which preserves compile-time safety.
Question 5 of 30
What is the primary reason Kotlin classes are final by default?
Show the answer
Answer: a · To encourage explicit design for inheritance and promote composition over inheritance.
The card states that Kotlin's design makes inheritance an intentional act to encourage more robust code and promotes composition over inheritance. Option A directly captures these core reasons. Option C is incorrect as 'final by default' relates to inheritance, not the mutability of properties, which is controlled by 'val' and 'var'.
Read the full bite: Kotlin Inheritance: Open for Extension, Closed by Default
Question 6 of 30
You need to store a collection of unique product SKUs that are currently in stock and frequently check if a particular SKU is available. Which Dart collection is the most efficient choice for this task?
Show the answer
Answer: a · Set, because it guarantees uniqueness and optimizes for fast existence checks.
Set is specifically designed for storing unique items and provides highly efficient checks for an item's existence, making it ideal for this scenario. While a Map can also provide fast lookups, a Set is the most direct and efficient choice when only uniqueness and existence checking are required, without needing to associate a value.
Read the full bite: Dart Collections: Choosing List, Set, or Map
Question 7 of 30
For which scenario is using platform-specific file extensions (e.g., MyComponent.ios.js) the most appropriate solution?
Show the answer
Answer: d · Implementing a component with fundamentally different structure and behavior on iOS and Android.
Platform-specific file extensions are recommended when a component's structure, behavior, or dependencies are fundamentally different between platforms. Options A, C, and D describe small, inline differences that are best handled with the Platform module's select method or OS checks, as using separate files for these would be overkill.
Question 8 of 30
Which statement accurately describes the behavior of the copy() method generated for a Kotlin data class?
Show the answer
Answer: d · It performs a shallow copy, meaning references to mutable objects within the data class are shared between the original and the new instance.
The card explicitly states that the copy() function creates a shallow copy. This means if a data class contains a mutable object, both the original and the copied instance will refer to the same mutable object. Option A is a common misconception, as many expect a copy function to perform a deep copy for safety.
Read the full bite: Kotlin Data Classes: Automatic Boilerplate for Data Holders
Question 9 of 30
What is the fundamental mechanism by which Hermes improves React Native app startup performance?
Show the answer
Answer: d · It performs Ahead-Of-Time (AOT) compilation of JavaScript into optimized bytecode during the app's build phase.
Hermes is an Ahead-Of-Time (AOT) focused engine that pre-compiles JavaScript into optimized bytecode during the build process, reducing the work the device has to do at startup. While it contributes to a smaller app size, its primary mechanism for faster startup is not tree-shaking or JIT compilation.
Read the full bite: Hermes: The JS Engine for Faster React Native Apps
Question 10 of 30
Which scenario best justifies using Swift's explicit error handling system (with "throws" and "do-catch")?
Show the answer
Answer: d · For operations that can fail in various ways, requiring the caller to understand the specific type of failure to recover.
The card states Swift's error handling is for "recoverable errors where the caller needs context about what went wrong." Option D directly reflects this, emphasizing the need for specific failure context. Option A is incorrect because the card advises using optionals for simple binary success/failure without extra context.
Read the full bite: Swift Error Handling: Throwing, Catching, and Propagating
Question 11 of 30
How does Dart's sound null safety fundamentally alter variable nullability?
Show the answer
Answer: b · Variables are non-nullable by default, requiring explicit opt-in for nullability.
Dart's sound null safety makes variables non-nullable by default, meaning they are guaranteed to hold a value. To allow a variable to be null, developers must explicitly opt-in by adding a '?' to its type. Option D describes the opposite behavior, which is common in many other languages but not Dart with null safety.
Read the full bite: Dart's Sound Null Safety: No More Null Errors
Question 12 of 30
Which fundamental design aspect of the React Native Bridge is primarily responsible for its performance limitations and visible UI jank?
Show the answer
Answer: b · Its asynchronous message passing mechanism between the JavaScript and native threads.
The card explicitly states that the Bridge's asynchronous nature and the inherent delays it causes are the source of its main limitations, leading to UI jank and preventing synchronous UI layout access. While JSON serialization adds overhead, the core problem causing delays and visual 'jumps' is the asynchronous communication.
Read the full bite: The React Native Bridge: Why It's Being Replaced
Question 13 of 30
Under which circumstance is it generally recommended to reconsider using a chain of standard Kotlin collection operations (like filter followed by map) and opt for an alternative?
Show the answer
Answer: b · When the collection is extremely large, and creating intermediate lists would be inefficient.
Standard chained collection operations create new intermediate lists for each step, which can be very inefficient for large collections. In such cases, using 'asSequence()' or a traditional loop is preferred to avoid this overhead. Option C is incorrect because aggregation can also be achieved using functional operations like 'reduce' or 'fold'.
Read the full bite: Kotlin Collections: Think Transformations, Not Loops
Question 14 of 30
When is it most appropriate to use Expo Application Services (EAS)?
Show the answer
Answer: d · When preparing a production-ready build for app store submission or pushing over-the-air updates.
EAS is designed for production workflows, handling cloud builds, app store submissions, and over-the-air updates for React Native apps. It is explicitly stated as distinct from local development tools like the `expo` CLI, which are used for prototyping and running local development servers.
Read the full bite: Expo Application Services (EAS): The Cloud Toolchain for React Native
Question 15 of 30
Which statement accurately describes the primary function of Dart's null-aware access operator (?. )?
Show the answer
Answer: a · It safely attempts to access a member, returning null if the object itself is null.
The null-aware access operator (?. ) safely checks if an object is null before attempting to access its members. If the object is null, the expression short-circuits and returns null, preventing a runtime error. Option D describes the if-null operator (??), and Option C describes the unsafe not-null assertion operator (!).
Read the full bite: Dart's Null-Aware Operators: Safely Handle Nulls
Question 16 of 30
When using Dart's cascade notation (..), what is a crucial difference compared to standard method chaining (.)?
Show the answer
Answer: c · The entire cascade expression evaluates to the original object, not the result of the last operation.
The card explicitly states that the cascade expression gives back the original object, not the result of the final task, which is the crucial difference from standard method chaining. Option B is incorrect because cascade notation modifies the original object in place and returns it, rather than creating a new one.
Read the full bite: Dart's Cascade Notation: Chain Calls on One Object
Question 17 of 30
What is the most direct consequence of calling an `async` function in Dart without using the `await` keyword?
Show the answer
Answer: a · The variable assigned the result will hold a `Future` object instead of the completed value.
The card explicitly states that forgetting `await` results in receiving a `Future` object instead of the actual data, which can lead to downstream type errors. The `async` function itself still executes non-blockingly, and it doesn't immediately throw an exception or prevent execution.
Read the full bite: Dart's async/await: Non-Blocking Code That Reads Synchronously
Question 18 of 30
In Swift, when is using a capture list with `self` most critical to prevent a retain cycle?
Show the answer
Answer: b · When a closure is stored as a property of a class instance and references `self`.
Option B correctly identifies the scenario where a retain cycle is most likely: when a closure is stored as a property of a class instance and captures `self`. This creates a strong reference from the instance to the closure and from the closure back to the instance. Option A describes a closure that is executed immediately, which does not typically lead to a retain cycle because the closure does not outlive the function call.
Read the full bite: Retain Cycles and Capture Lists in Swift
Question 19 of 30
Which characteristic primarily explains why ScrollView is discouraged for long, dynamic lists?
Show the answer
Answer: c · It renders all its child components into a single view at once, consuming significant resources.
The card explicitly states that ScrollView renders every single item, even those off-screen, leading to poor performance and high memory consumption. This simultaneous rendering of all content is the fundamental limitation, while other options describe consequences or secondary issues.
Question 20 of 30
Two threads hold references to the same Swift array through two variables, a and b, and both threads call a mutating method on their variable at the same time without any lock. What is the risk?
Show the answer
Answer: c · The isKnownUniquelyReferenced check itself is not thread-safe, so concurrent mutation can race and corrupt the shared buffer
Copy-on-write's uniqueness check and buffer swap are not synchronized, so two threads racing through them concurrently can corrupt shared state or crash. Arrays are not automatically thread-safe, there is no internal lock making one mutation block for the other, and this is a runtime hazard the compiler cannot catch.
Question 21 of 30
Which problem does Kotlin's Structured Concurrency primarily aim to solve?
Show the answer
Answer: d · Preventing resource leaks from uncancelled background tasks.
Structured concurrency's main purpose is to enforce lifetime management for concurrent work, preventing resource leaks and unnecessary work by ensuring background tasks are cancelled when no longer needed. While other options are valid concurrency concerns, they are not the primary problem addressed by structured concurrency itself.
Question 22 of 30
What is the primary reason to use an associated type within a Swift protocol?
Show the answer
Answer: b · To enable the protocol to refer to a type whose concrete definition is only known by conforming types.
Associated types exist to allow a protocol's blueprint to refer to a type that is not known until a concrete type adopts the protocol, making the protocol generic over types it uses. Option C is a tempting distractor because, while desirable, the card explicitly states that protocols with associated types cannot be used directly as concrete types for variables or collections without workarounds.
Read the full bite: Associated Types: Making Protocols Generic
Question 23 of 30
What is the recommended approach for managing user input in a React Native TextInput?
Show the answer
Answer: c · Set the value prop to a state variable and update it via the onChangeText callback.
The card emphasizes treating TextInput as a controlled component, where the app's state is the single source of truth, updated by onChangeText and reflected by the value prop. Option B describes an uncontrolled component, which is not the recommended mental model for TextInput.
Read the full bite: React Native TextInput: Handling User Input
Question 24 of 30
For which scenario is React Native's Pressable component most beneficial compared to a simple Button or View with an onPress handler?
Show the answer
Answer: c · When you want to detect specific touch stages like a finger pressing down, holding, or releasing.
Pressable's core purpose is to provide granular control over touch interactions, allowing detection of events like onPressIn, onLongPress, and onPressOut. The card explicitly states that for standard, platform-styled buttons with minimal logic, the basic Button component is simpler, making option D incorrect.
Read the full bite: Pressable: A More Powerful Way to Handle Touches
Question 25 of 30
What is the key distinction in how a child coroutine's termination impacts its parent Job?
Show the answer
Answer: a · An unhandled exception from a child cancels the parent, while a child's normal cancellation does not.
The card states that if a child Job fails with an exception (other than CancellationException), it cancels its parent. However, if a child is cancelled normally via cancel() (which uses CancellationException), it does not affect the parent.
Read the full bite: Kotlin's Job: A Handle to a Background Task
Question 26 of 30
For which scenario is Kotlin's async/await pattern the most appropriate choice?
Show the answer
Answer: c · Fetching a user's profile and their friends list concurrently from different API endpoints.
The card states that async/await is for running multiple independent, long-running tasks concurrently and combining their results, as exemplified by fetching data from different API endpoints. Option B describes an anti-pattern, as async/await is not for sequential, dependent operations.
Read the full bite: Kotlin Coroutines: async/await for Parallel Results
Question 27 of 30
What is the primary advantage of using a key path over direct dot notation for property access?
Show the answer
Answer: d · It allows for dynamic, type-safe referencing of properties in generic contexts.
Key paths are designed to pass a type-safe reference to a property itself, enabling generic APIs and dynamic access without losing compile-time safety. Direct dot notation is generally more performant for simple, known property access, making option B incorrect. Key paths enforce type safety, disproving option C, and they refer to the property's location, not its value, making option A incorrect.
Read the full bite: Key-Path Expressions: Type-Safe Pointers to Properties
Question 28 of 30
What is the primary advantage of using an opaque type (e.g., some Collection) as a function's return type?
Show the answer
Answer: b · It provides flexibility to change the underlying implementation without breaking client code.
Opaque types hide the concrete return type behind a protocol, allowing the API provider to change the underlying implementation (e.g., from one collection type to another) without affecting client code that only depends on the protocol. Option A is incorrect because a function with an opaque return type must always return the exact same concrete type. Option D is incorrect because the 'opaque' nature means the client only sees the protocol's capabilities, not the concrete type's unique methods.
Read the full bite: Opaque Types: Hide Implementation, Not Capabilities
Question 29 of 30
What is the primary reason StateFlow is generally not recommended for handling one-time UI events like showing a Snackbar?
Show the answer
Answer: a · Its state-holding nature can cause the event to be re-emitted upon UI re-collection (e.g., config change).
StateFlow is a state-holder that always provides the current value. If used for one-shot events, its state-holding nature means that a UI re-collection (e.g., after a configuration change) would re-receive the last "event" state, causing the event to trigger again. Options A, B, and D describe incorrect characteristics of StateFlow.
Question 30 of 30
What is the primary benefit of Dart's `map()` and `where()` methods being lazy?
Show the answer
Answer: b · They reduce memory consumption by avoiding the creation of temporary intermediate lists.
Lazy `map()` and `where()` methods defer computation until elements are actually requested, which prevents the creation of new, temporary lists for each step in a chain of operations. This significantly reduces memory overhead, especially for large datasets. Option C is incorrect because lazy iterables re-evaluate their operations each time they are iterated, unless explicitly materialized with `.toList()`.
Read the full bite: Dart's Lazy Iterable Methods: map() and where()
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.