Qtr No. 213, New Town Yehlanka
Indore 454775, India
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 Telegram Group https://rebrand.ly/lex-telegram-236dee