What will be the output of the following C# code? [code] class maths { int i; public maths(int ii) { ii = -25;

What will be the output of the following C# code?
Code:
class maths
{
    int i;
    public  maths(int ii)
    {
        ii = -25;
        int g;
        g = ii > 0 ? ii : ii * -1;
        Console.WriteLine(g);
    }
}
class maths1 :maths
{
    public  maths1(int ll) :base(ll)
    {
        ll = -1000;
        Console.WriteLine((ll > 0 ? ll : ll * -1));
    }
}
class Program
{
    static void Main(string[] args)
    {
        maths1 p = new maths1(6);
        Console.ReadLine();
    }
}
A.
-25
-1000
B.
-1000
-25
C.
25
1000
D. None of the mentioned
 

Tìm kiếm

Back
Top