Question No : 1
Correct Set of Code for given data ‘a’ and ‘b’ to print output for ‘c’ as 74
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);
Question No : 2
How many Bytes are stored by Long Datatype in C# .net?
Question No : 3
Choose “.NET class” name from which datatype “UInt” is derived ?
Question No : 4
Correct Declaration of Values to variables a and b?
Question No : 5
Select error in the given program :
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();
}
Question No : 6
Correct Set of Code for given data ‘a’ and ‘b’ to print output for ‘c’ as 74 ?
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);
Question No : 7
Arrange the following datatype in order of increasing magnitude sbyte, short, long, int.