MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the given set of code? class maths { public int length; public int breadth; public maths(int x, int y) { length = x; breadth = y; Console.WriteLine(x + y); } public maths(double x, int y) { length = (int)x; breadth = y; Console.WriteLine(x * y); } } class Program { static void Main(string[] args) { maths m = new maths(20, 40); maths k = new maths(12.0, 12); Console.ReadLine(); } } |
| A. | 60, 24 |
| B. | 60, 0 |
| C. | 60, 144 |
| D. | 60, 144.0 |
| Answer» D. 60, 144.0 | |