

MCQOPTIONS
Saved Bookmarks
1. |
Which of the following is correct about the C#.NET snippet given below? namespace IndiabixConsoleApplication { class Baseclass { public void fun() { Console.WriteLine("Hi" + " "); } public void fun(int i) { Console.Write("Hello" + " "); } } class Derived: Baseclass { public void fun() { Console.Write("Bye" + " "); } } class MyProgram { static void Main(string[ ] args) { Derived d; d = new Derived(); d.fun(); d.fun(77); } } } |
A. | The program gives the output as: Hi Hello Bye |
B. | The program gives the output as: Bye Hello |
C. | The program gives the output as: Hi Bye Hello |
D. | Error in the program |
Answer» C. The program gives the output as: Hi Bye Hello | |