Skip to content
tezvyn:

Top 30 Beginner Interview Questions and Answers

30 multiple-choice questions on Beginner, drawn from 30 bites out of the 34 tagged Beginner on Tezvyn. 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.

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

    A team needs to speed up queries on a large table and purge old records. Which task requires DDL?

    Show the answer

    Answer: b · Adding an index on the date column to speed up filtering

    Adding an index changes the database schema, which is the purpose of DDL. Purging old rows may seem structural, but it only deletes data, making it a DML operation.

    Read the full bite: DDL: The Blueprint for Database Objects

  2. Question 2 of 30

    When you write let message = 'hello' without a type annotation, what is the resulting compile-time behavior?

    Show the answer

    Answer: a · TypeScript infers string and later rejects message = 42 with a type error

    TypeScript analyzes the right-hand side to infer string, so reassigning a number later causes a compile-time error. Distractor A is wrong because omitting an annotation does not default to any; the compiler deduces a specific static type instead.

    Read the full bite: Explain what TypeScript's type inference is and show an inferred variable declaration

  3. Question 3 of 30

    What is the main benefit of using control flow statements like if and for in Swift?

    Show the answer

    Answer: c · They allow a program to make decisions and repeat specific actions.

    Control flow statements are essential because they enable programs to make decisions based on conditions and to repeat blocks of code, moving beyond a simple linear execution. While they can help structure logic to avoid errors, their primary role isn't automatic error fixing or direct speed optimization.

    Read the full bite: Swift Control Flow: Directing Your Code's Path

  4. Question 4 of 30

    What is the primary reason for using control flow statements in a program?

    Show the answer

    Answer: a · To allow the program to make decisions and repeat actions based on conditions.

    The card explains that control flow allows programs to "react to different inputs, repeat tasks, and handle problems," which directly translates to making decisions and repeating actions. Defining reusable code blocks (functions) is a separate concept, even though functions often contain control flow.

    Read the full bite: Dart's Control Flow: Telling Your Code What to Do Next

  5. Question 5 of 30

    You need to configure a new object inside a lambda using receiver syntax, then return the configured object itself for assignment. Which scope function should you use?

    Show the answer

    Answer: a · apply

    apply exposes the object as a receiver (this) and returns the context object itself, making it ideal for builder-style configuration. run is a tempting distractor because it also uses receiver syntax, but it returns the lambda result rather than the configured object.

    Read the full bite: Explain the difference between Kotlin's let, run, with, apply, and also

  6. Question 6 of 30

    Given enum WebEvent { PageLoad, PageUnload, KeyPress(char) }, which line correctly instantiates the KeyPress variant with 'q'?

    Show the answer

    Answer: d · let press = WebEvent::KeyPress('q');

    Rust namespaces enum variants under the type with double colons, so WebEvent::KeyPress('q') is correct. WebEvent.KeyPress('q') is invalid because Rust does not use dot notation for enum variants, unlike some other languages.

    Read the full bite: Define a WebEvent enum with PageLoad, PageUnload, and KeyPress

  7. Question 7 of 30

    What is required for Android to automatically select a landscape layout when the device rotates, without adding orientation logic in your Activity?

    Show the answer

    Answer: a · Create res/layout-land/ and place an XML file with the identical filename used in res/layout/

    The framework matches the current configuration to qualifier directories at runtime, but only when XML files share the same name so R.layout.name resolves to the correct variant automatically. Detecting orientation manually or using configChanges prevents this automatic declarative selection and forces unnecessary branching code.

    Read the full bite: What is the res directory and how do you use orientation qualifiers?

  8. Question 8 of 30

    In module example.com/shop, directory helpers/ contains files with package utils. What is the correct way to import and use ProcessOrder?

    Show the answer

    Answer: b · Import example.com/shop/helpers and call utils.ProcessOrder

    The import path is always the module path plus the subdirectory (helpers), while the package clause (utils) sets the qualifier used in code. Option A is wrong because it assumes the directory name becomes the code qualifier, a common beginner misconception.

    Read the full bite: Go package declaration, directory name, and import path relationship

  9. Question 9 of 30

    When is it inappropriate to use a callback in Node.js?

    Show the answer

    Answer: a · When you must have a result before the next line runs

    The card explicitly warns against using callbacks when you need a result immediately before moving on, because they are designed for deferred, non-blocking execution. The other three options are all I/O scenarios where callbacks are the recommended pattern.

    Read the full bite: Node.js Callbacks: Functions That Run Later

  10. Question 10 of 30

    To properly include a new image asset (like a user avatar) in an Android application, where should it be placed?

    Show the answer

    Answer: c · Within a designated subfolder, such as drawable, inside the res directory.

    The 'res' folder is specifically designed for non-code resources like images, with 'drawable' being the correct subfolder for image assets. Placing it in the 'java' or 'kotlin' folder is incorrect because those are reserved for source code, keeping resources and logic separate.

    Read the full bite: Android Project Structure: Your App's Filing Cabinet

  11. Question 11 of 30

    What is the most likely outcome if a new Activity class is implemented but not declared in AndroidManifest.xml?

    Show the answer

    Answer: d · The app will crash with an ActivityNotFoundException when attempting to launch the Activity.

    The card states that forgetting an Activity declaration will cause the app to crash with an ActivityNotFoundException when launched, as the OS doesn't recognize it. The app will compile successfully without the declaration, making compilation failure (Option B) incorrect.

    Read the full bite: AndroidManifest.xml: The Blueprint for Your App

  12. Question 12 of 30

    Why does a local variable in Go sometimes get allocated on the heap instead of the stack?

    Show the answer

    Answer: d · The compiler cannot prove the variable's lifetime ends before the function returns

    Go's compiler stack-allocates local variables when it can prove their lifetime is bounded by the function scope, so a value only escapes to the heap when that proof fails. The first option is wrong because the GC does not manage stack memory; stack-allocated locals are reclaimed instantly by moving the stack pointer when the function returns, with no GC involvement.

    Read the full bite: Describe Go's memory management, garbage collection, and trade-offs

  13. Question 13 of 30

    You need equal spacing before the first child, between children, and after the last child in a Row. What is the correct approach?

    Show the answer

    Answer: c · Set mainAxisAlignment to MainAxisAlignment.spaceEvenly

    MainAxisAlignment.spaceEvenly divides all free horizontal space into equal gaps before, between, and after children. spaceBetween is a tempting distractor because it only places free space between children, leaving the edges flush.

    Read the full bite: In a Row, how do you space children evenly across the width?

  14. Question 14 of 30

    What is the main reason to declare a FastAPI dependency in a path operation parameter?

    Show the answer

    Answer: a · To let FastAPI automatically inject reusable logic so routes stay focused on HTTP concerns.

    The correct answer is C because dependency injection allows FastAPI to wire reusable components into routes, keeping handlers clean. A is tempting because it describes calling helpers, but that misses the inversion-of-control pattern where the framework injects the dependency rather than the route calling it manually.

    Read the full bite: How do you declare a function as a dependency, and why?

  15. Question 15 of 30

    Why is a line chart a poor choice for comparing market share across five separate companies in a single quarter?

    Show the answer

    Answer: a · It falsely implies a sequence or trend between discrete company categories.

    A line chart encodes continuity over time, so connecting discrete companies falsely implies a nonexistent sequence or trend. While bar lengths do make ranking easier, the most tempting distractor misattributes the core issue to ranking rather than the semantic mismatch that actively misleads viewers.

    Read the full bite: Compare five companies' market share: bar or line chart?

  16. Question 16 of 30

    What is the primary reason to explicitly declare a function's return type in TypeScript, rather than letting it be inferred?

    Show the answer

    Answer: c · To ensure the function's output type remains predictable and stable, even if its implementation details evolve.

    Explicitly declaring the return type acts as a contract, ensuring that if the function's internal logic changes, TypeScript will flag an error if the new logic produces a different type than declared. This prevents subtle bugs that inference might otherwise miss. TypeScript performs static type checking at compile-time and does not automatically cast or convert types at runtime to fix mismatches; it will report a compile-time error instead.

    Read the full bite: TypeScript: Typing Function Inputs and Outputs

  17. Question 17 of 30

    You have created local color and text styles in a Figma file and want to share them with your team so updates propagate automatically. What should you do?

    Show the answer

    Answer: a · Open the Publish modal, select the color and text styles, add a version description, publish, and have teammates enable the library in their files.

    Figma's publish-subscribe model requires publishing selected styles with a version note and then having teammates enable the library to receive automatic updates. Copy-paste breaks propagation, and converting styles into components confuses two different Figma primitives.

    Read the full bite: Steps to publish color and text styles to a Figma shared library

  18. Question 18 of 30

    What is the primary mechanism Go uses to identify a program as an executable rather than a reusable library?

    Show the answer

    Answer: a · Declaring `package main` and defining a `func main()` function.

    The card explicitly states that `package main` and its `main()` function serve as the unambiguous signal for the Go compiler to create a runnable executable. Option D is incorrect because `go.mod` manages modules and dependencies, not the program's execution type.

    Read the full bite: Go's Entry Point: The `main` Package and Function

  19. Question 19 of 30

    Which syntax correctly implements a trait for a specific concrete type in Rust?

    Show the answer

    Answer: c · impl TraitName for Type provides concrete method bodies for a specific struct or enum

    The impl TraitName for Type syntax is required to attach concrete logic to a specific struct or enum. Option A is wrong because impl Type alone defines inherent methods, not a trait implementation, and omitting for is a common beginner mistake.

    Read the full bite: What is the difference between defining a Rust trait and implementing it?

  20. Question 20 of 30

    A developer runs terraform plan in a CLI-driven HCP Terraform workspace. What occurs during this step?

    Show the answer

    Answer: b · A remote speculative plan previews changes, validates against policies, and leaves infrastructure unchanged

    terraform plan initiates a remote speculative run that shows proposed changes and checks policies without altering infrastructure. Distractor A is wrong because provisioning and state locking happen during terraform apply, not during the speculative plan phase.

    Read the full bite: Describe the Terraform workflow from code to live

  21. Question 21 of 30

    What is the immediate result of calling an async def function without using await?

    Show the answer

    Answer: d · A coroutine object is returned but the body has not yet executed

    Calling an async def function returns a coroutine object immediately without running any of the function body; execution only begins when the object is awaited or wrapped in create_task. The distractor that it runs up to the first await is wrong because the body does not start executing at all upon the bare call.

    Read the full bite: What is the difference between async def and regular functions?

  22. Question 22 of 30

    Why is the 4 P's formula a poor choice for an internal API reference document?

    Show the answer

    Answer: a · Because it introduces sales friction where only instruction is needed

    The card states that in technical documentation the goal is pure instruction, so adding a persuasive narrative creates unnecessary sales friction and erodes trust. Option B seems intuitively true but misattributes the reason to format preference rather than mismatched intent.

    Read the full bite: The 4 P's Formula: Picture, Promise, Prove, Push

  23. Question 23 of 30

    You need to recover one component from an older Figma autosave without losing later changes. What should you do?

    Show the answer

    Answer: c · Duplicate the autosave into a new file, copy the component, and paste it back into the current file

    Figma version history is file-level, so restoring an autosave directly would overwrite all later work. Duplicating the old version to a new file lets you safely copy just the component you need and paste it back.

    Read the full bite: How do you restore one component from Figma version history?

  24. Question 24 of 30

    You need to build a counter in Figma that increases by one when a user clicks a '+' button. Which approach correctly uses variables to update the display within a single frame?

    Show the answer

    Answer: d · Apply a number variable to the text layer, then add an On click Set variable action to the plus button using an expression to add one

    The correct workflow binds a number variable to the text layer and mutates it with a Set variable expression on click, keeping everything inside one frame. Option B is wrong because duplicating hardcoded frames avoids variables entirely and is a common red flag that shows a lack of understanding of dynamic state in Figma prototypes.

    Read the full bite: Create a counter where clicking '+' increases the number by one

  25. Question 25 of 30

    Why should an A/B test of a 'Buy Now' button color randomize participants by user rather than by session?

    Show the answer

    Answer: d · Session-level randomization can expose the same person to both variants, contaminating the experiment.

    User-level randomization prevents the same individual from seeing different button colors across return visits, which would muddy the causal effect. A fifty-fifty split is a design target, not an automatic guarantee of user-level assignment, and contamination is a concern regardless of login status.

    Read the full bite: Design an A/B test for a 'Buy Now' button color change

  26. Question 26 of 30

    A junior teammate asks why both go.mod and go.sum must be committed. What is the correct explanation?

    Show the answer

    Answer: c · go.mod declares minimum required versions, while go.sum stores cryptographic checksums to verify downloaded content.

    go.mod is a manifest that declares the module path and minimum required versions, while go.sum is an integrity log containing cryptographic checksums that verify downloaded module content and prevent supply-chain tampering. The distractor claiming go.mod pins exact versions confuses it with a lockfile, but Go uses minimal version selection and go.sum ensures integrity rather than locking versions.

    Read the full bite: How do you initialize and manage Go dependencies?

  27. Question 27 of 30

    Which problem does a feature store directly solve in a production ML platform?

    Show the answer

    Answer: c · Training and serving pipelines use inconsistent feature transformations

    A feature store guarantees identical feature vectors during training and inference, preventing training-serving skew. Option A is a tempting distractor because both the feature store and model registry are centralized storage layers, but versioning model stages is the registry's job.

    Read the full bite: What are the essential components of an end-to-end ML platform?

  28. Question 28 of 30

    Your app uses the AWS SDK to upload a file to S3, but the call hangs and times out without a permission error. What is the most likely cause?

    Show the answer

    Answer: c · The SDK configuration is missing the AWS region or valid credentials

    The card warns that forgetting the region or credentials is a common footgun that produces silent failures resembling network errors. Option A is tempting because timeouts feel like retry issues, but the SDK already handles exponential backoff automatically, whereas missing configuration prevents the request from ever reaching the service.

    Read the full bite: AWS SDK: Code That Operates Your Cloud

  29. Question 29 of 30

    Given its synchronous API and embedded design, which workload is node:sqlite best suited for?

    Show the answer

    Answer: c · A local CLI utility that logs events to a file without extra npm dependencies

    node:sqlite is designed for lightweight, local structured storage such as CLI tools that avoid external dependencies, whereas a high-traffic API is a poor fit because DatabaseSync executes synchronously and blocks the event loop.

    Read the full bite: Node.js Built-in SQLite Driver

  30. Question 30 of 30

    For a result that belongs to one specific native call, which mechanism is preferable to a broadcast event?

    Show the answer

    Answer: b · Returning a Promise or callback scoped to that call

    A Promise or callback ties the response to the originating request. A broadcast event fires for every listener, which is wrong for a single scoped result.

    Read the full bite: How do you send a one-off event from native to JS?

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