Async / await · interview question
What happens when execution reaches await on a task that hasn't completed yet?
Multiple choiceEasy
Answer and explanation
Correct answer
A. The method returns to its caller, and the rest of the method resumes when the task completes.
Why
await registers the remainder of the method as a continuation and returns an incomplete Task to the caller. No thread sits waiting; that's why async I/O scales.
Test yourself on Async / await
A free test with instant, explained results. No account needed.