Consider the following code:
public class ClassPoint
{
public int X;
public int Y;
public ClassPoint(int a, int b)
{
X = a;
Y = b;
}
}
public struct StructPoint
{
public int X;
public int Y;
public StructPoint(int a, int b)
{
X = a;
Y = b;
}
}
public class Test
{
static void Main(string[] args)
{
ClassPoint a = new ClassPoint(10, 10);
ClassPoint b = a;
a.X = 100;
StructPoint c = new StructPoint(10, 10);
StructPoint d = c;
c.X = 100;
Console.WriteLine(b.X.ToString() + "," + d.X);
}
}
What will be the output printed on the screen?
Correct Answer: 100 ,10
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More C# MCQ Questions