2
Both 1,2
1
None of the mentioned
A. 2
long < short < int < sbyte
sbyte < short < int < long
short < sbyte < int < long
short < int < sbyte < long
c = a + b;
c = a + int(float(b));
c = a + convert.ToInt32(b);
c = int(a + b) ;
int a = 32, b = 40.6;
int a = 42; b = 40;
int a = 32; int b = 40;
int a = b = 42;
int a = 12;
float b = 6.2f;
int c;
c = a / b + a * b;
Console.WriteLine(c);
int a = 12;
float b = 6.2f;
int c;
c = a / convert.ToInt32(b) + a * b;
Console.WriteLine(c);
int a = 12;
float b = 6.2f;
int c;
c = a / convert.ToInt32(b) + a * convert.ToInt32(b);
Console.WriteLine(c);
int a = 12;
float b = 6.2f;
int c;
c = convert.ToInt32(a / b + a * b);
Console.WriteLine(c);
Static Void Main(String[] args)
{
const int m = 100;
int n = 10;
const int k = n / 5 * 100 * n ;
Console.WriteLine(m * k);
Console.ReadLine();
}
‘k’ should not be declared constant
Expression assigned to ‘k’ should be constant in nature
Expression (m * k) is invalid
‘m ‘ is declared in invalid format
System.Int16
System.UInt32
System.UInt64
System.UInt16
int a = 12;
float b = 6.2f;
int c;
c = a / b + a * b;
Console.WriteLine(c);
int a = 12;
float b = 6.2f;
int c;
c = a / convert.ToInt32(b) + a * b;
Console.WriteLine(c);
int a = 12;
float b = 6.2f;
int c;
c = a / convert.ToInt32(b) + a * convert.ToInt32(b);
Console.WriteLine(c);
int a = 12;
float b = 6.2f;
int c;
c = convert.ToInt32(a / b + a * b);
Console.WriteLine(c);
8
4
2
1
2
Both 1,2
1
None of the mentioned
sbyte
short
int
long