What is the output of the following code snippet?

class Demo
{
public static void Main(string[] args)
{
int var=4,temp;
double result,modVar;
result = (double) var / 3.9;
modVar = var % 4;
temp=(int)result + (int)modVar;
if(temp==1){
Console.WriteLine("The condition is true");
}
else{
Console.WriteLine("The condition is false");
}

}
}

The condition is true
This code will not compile as value of  int data type cannot be converted to boolean data type
The condition is false
This code will not compile as value of int data type cannot be converted to double data type
Correct Option - a

To get all Infosys Certified L1 Junior Microsoft .NET Programmer 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