Search⌘ K
AI Features

Quiz

Review and apply your understanding of asynchronous programming in C# through targeted quiz questions. This lesson helps you practice key concepts such as async methods, task handling, and concurrency control to strengthen your readiness for senior engineering interviews.

Question # 1

Consider the snippet below:

C#
async Task Wait()
{
await Task.Delay(1000);
}
async Task Wrapper()
{
await Wait();
await Wait();
}
public void runTest()
{
Wrapper();
}
Technical Quiz
1.

What is the outcome of running the runTest() in the snippet above?

A.

The method waits for one second before executing

B.

The method waits for two seconds before executing

C.

The method doesn’t doesn’t block and exits because the Wrapper() method is async


1 / 1
C#
using System;
using System.Threading;
using System.Threading.Tasks;
class Demonstration
{
static async Task Wait()
{
await Task.Delay(1000);
}
static async Task Wrapper()
{
await Wait();
await Wait();
}
static public void runTest()
{
Wrapper();
}
static void Main()
{
runTest();
}
}

Question # 2

...