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

What will be the output of the following C# code?
Code:
class maths
{
    int i;
    public maths(int x)
    {
        i = x;
        Console.WriteLine(" hello: ");
    }
}
class maths1 : maths
{
    public  maths1(int x) :base(x)
    {
        Console.WriteLine("bye");
    }
}
class Program
{
    static void Main(string[] args)
    {
        maths1 k = new maths1(12);
        Console.ReadLine();
    }
}
A. hello bye
B. 12 hello
C. bye 12
D. Compile time error
 

Tìm kiếm

Back
Top