Question 6: What will be the output of the following program?
public static void Main(string[] args)
{
float f = 10.5F;
int i = 20;
var sum = f + i;
Console.Write(sum);
}
Question 7: You want to hold the largest positive integer value in a variable. Which of the following data type will you use for a variable?
Question 8: If you want to hold a positive integer value up to 250. Which of the following data type will you use for a variable?
Question 9: What will be the output of following code?
Console.WriteLine(Convert.ToInt32('A'));
Question 10: What will be the output of the following program?:
public static void Main(string[] args)
{
int x = 5;
square(x);
Console.Write(x);
}
static void square(int x)
{
x = x * x;
}