Qtr No. 213, New Town Yehlanka Indore 454775
What will be the output of the following code snippet?
class ClassRoom
{
public static int numberOfComputers;
static ClassRoom()
{
numberOfComputers = 100;
Console.WriteLine("Computers Set Up Complete");
}
public ClassRoom()
{
Console.WriteLine("Class Room Set Up Complete");
}
}
class Program
{
public static void Main(string[] args)
{
ClassRoom.numberOfComputers = ClassRoom.numberOfComputers + 1000;
Console.WriteLine(ClassRoom.numberOfComputers);
ClassRoom classRoomObj = new ClassRoom();
}
}
Select the output from the following options:
a. Computers Set Up Complete
1100
Class Room Set Up Complete
b. 1100
Class Room Set Up Complete
c. Computers Set Up Complete
1100
Computers Set Up Complete
Class Room Set Up Complete
d. Computers Set Up Complete
100
Class Room Set Up Complete
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