Logo

Question preview

Return what?

What this preview is

About this preview

Return what? is a easy quant interview question on language knowledge in Rust.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

Understanding Rust's println! macro return type

This is a straightforward language-knowledge question about Rust's standard library macros. It tests whether a candidate has read the documentation carefully or experimented enough with Rust to understand what the most commonly used output macro actually returns.

The question probes attention to detail: many developers use println! regularly without stopping to think about its signature. Getting this right requires either having looked at the macro's definition or having tried to assign its result to a variable. It's a quick way to separate candidates who have solid Rust fundamentals from those who have only skimmed the surface.

  • The distinction between functions that return values and those that return unit type
  • How Rust's type system handles side effects
  • Reading and interpreting standard library documentation