MCQs > IT & Programming > C# > Given the following code : void Main() { var x = 123; Task t = new Task(()=>{ x++; }); t.Start(); Console.WriteLine(x.ToString()); } What is the expected value of x ?

C# MCQs

Given the following code : void Main() { var x = 123; Task t = new Task(()=>{ x++; }); t.Start(); Console.WriteLine(x.ToString()); } What is the expected value of x ?

Answer

Correct Answer: 123 or 124 (unpredictable)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it