a) Quyidagi kodning natijasini ayting va tushuntiring:
int x = 10;
int y = x;
y = 20;
Console. WriteLine (x);
Javob: 10.
b) Quyidagi kodning natijasini tushuntiring:
class Person
{
public string Name;
class Program
{
static void Main(string|) args)
{
Person p1 = new Person();
p1. Name = "Alice" ;
Person p2 = p1;
p2. Name = "Bob" ;
Console. WriteLine(p1 .Name) ;
}
}
}
Javob: Alice;
Top comments (0)