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
Verified Answer
Correct Option - a

To get all Infosys Certified L1 Junior Microsoft .NET Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram