What will be the output of the following C# code?
static void Main(string[] args)
{
int i = 10;
double d = 35.78;
fun(i);
fun(d);
Console.ReadLine();
}
static void fun(double d)
{
Console.WriteLine(d);
}
static void Main(string[] args)
{
int i = 10;
double d = 35.78;
fun(i);
fun(d);
Console.ReadLine();
}
static void fun(double d)
{
Console.WriteLine(d);
}A. 35.78
10
B. 10
35
C. 10
35.78
D. None of the mentioned
Answer: Option C

Join The Discussion