a) %hx for small case letters and %HX for capital letters b) %x for small case letters and %X ...
View Question
What will be the output of the following C# code?
public static void Main(string[] args)
{
double ZERO = 0;
Console.WriteLine(“RESULT OF DIVISION BY ZERO IS :{0}”, (0 / ZERO));
Console.ReadLine();
}
What will be the output of the following C# code? public static void Main(string[] args) {
View QuestionThe Default value of Boolean Data Type is?
a) 0 b) True c) False d) 1 Answer: c Explanation: False
View QuestionA float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored?
a) ABCD b) DCBA c) 0 * ABCD d) Depends on big endian or little endian architecture Answer: ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
int x = 1;
float y = 2. 4f;
short z = 1;
Console. WriteLine((float) x + y * z – (x + = (short) y) );
Console. ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question
Why does a float variable stop incrementing at number ‘16777216’ in the following C# code?
float a = 0 ;
while (true)
{
a++;
if (a > 16777216)
break;
}
Why does a float variable stop incrementing at number ‘16777216’ in the following C# code? float a ...
View QuestionMinimum and Maximum range of values supported by ‘float’ data type are?
a) 1.5 * 10-40 to 3.4 * 1038 b) 1.5 * 10-45 to 3.4 * 1030 c) 1.5 * ...
View QuestionValid Size of float data type is?
a) 10 Bytes b) 6 Bytes c) 4 Bytes d) 8 Bytes Answer: c Explanation: 4 Bytes
View QuestionNumber of digits upto which precision value of float data type is valid?
a) Upto 6 digit b) Upto 8 digit c) Upto 9 digit d) Upto 7 digit Answer: d Explanation: ...
View QuestionSelect a convenient declaration and initialization of a floating point number:
a) float somevariable = 12.502D b) float somevariable = (Double) 12.502D c) float somevariable = (float) 12.502D d) float somevariable = ...
View Question