MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the given set of 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 |
| Answer» B. 12 hello | |