nerdexam
Microsoft

98-361 · Question #382

98-361 Question #382: Real Exam Question with Answer & Explanation

The correct answer is C. 30. See the full explanation below for the reasoning.

Question

You are reviewing a C# program that contains the following class: public class Rectangle { public double Length {get; set;} public double Width { get; set; } } The program executes the following code as part of the Main method: Rectangle r1, r2; r1 = new Rectangle { Length = 10.0, Width = 20.0 }; r2 = r1; r2.Length = 30; Console.WriteLine(r1.Length); What will be the output when this code is executed?

Options

  • A10
  • B20
  • C30
  • D40

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice