1
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following program?
var p = new Product { Price = 120 };
Console.WriteLine(p.Price);
class Product { public int Price { get; set; } }What is the output of the following program?
var u = new User { Name = "Ravi" };
Console.WriteLine(u.Name.Length);
class User { public string Name { get; init; } = ""; }