Qtr No. 213, New Town Yehlanka Indore 454775
Consider the following code snippet:
public class Card
{
public static void RequestCard()
{
Console.WriteLine("Request Logged");
}
}
public class DebitCard: Card
{
public DebitCard()
{
Console.WriteLine("Debit Card");
Card.RequestCard() ;
}
public static void Main()
{
DebitCard debitCardObj = new DebitCard();
}
}
What will be the output?
a. Debit Card
Request Logged
b. Debit Card
c. Compilation Error: "Non-Static constructor cannot call static methods"
d. Runtime Error
Option a
Option b
Option c
Option d
To get all Basic CSharp Programming Assessment Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in