Elance Exams Answers PDF file

-- PDF FILE --
Download PDF file of elance Zoho Creator Exam Answers
elance-zoho-creator-exam.pdf

What will be the console output when running the "Main" method ? static void Main(string[] args) { Car firstVehicle = new Bus(); Car secondVehicle = new Motorcycle(); Console.WriteLine(firstVehicle.GetPassengerCount()); Console.WriteLine(secondVehicle.GetPassengerCount()); } internal class Car { internal virtual int GetPassengerCount() { return 4; } } internal class Bus : Car { internal int GetPassengerCount() { return 8; } } internal class Motorcycle : Car { internal override int GetPassengerCount() { return 1; } }

It doesn't compile
4 4
4 1
8 4
8 1
Top
  • Follows us our servcies
  • Facebook icon
  • Linkedin icon
  • twitter icon
  • rss icon
  • social icon