1. How many Bytes are stored by ‘Long’ Data type in C# .net ?
A. 2 Bytes B. 4 Bytes C. 8 Bytes D. 16 Bytes
View Answer
Discuss forum
Workplace
Report
Answer: Option C
Explanation:
Long is the data type keyword used for storing data of unlimited length so by definition its size is always maximum i.e 8.
See More Information
Tutorial Link:
Published by:
2. Choose “.NET class” name from which data type “UInt” is derived ?
A. System.UInt16 B. System.UInt64 C. System.UInt32 D. System.Int16
View Answer
Discuss forum
Workplace
Report
Answer: Option B
Explanation:
By Definition class assigned to:
System.Int16 = short.
System.UInt32 = UInt.
System.UInt64 = ULong.
See More Information
Tutorial Link:
Published by:
3. Correct Declaration of Values to variables ‘a’ and ‘b’?
A. int a = 32, b = 40.6; B. int a = 42; b = 40; C. int a = 32; int b = 40; D. int a = b = 42;
View Answer
Discuss forum
Workplace
Report
Answer: Option C
Explanation:
1. Although, declaration of ‘b’ and ‘a’ are correct but initialization of value to ‘b’ should be ‘int’ data type not float. 2. Missing declaration type of ‘b’. 3. Correctly declared
See More Information
Tutorial Link:
Published by:
4. Arrange the following data type in order of increasing magnitude sbyte, short, long, int ?
A. short < int < sbyte < long B. short < sbyte < int < long C. sbyte < short < int < long D. long < short < int < sbyte
View Answer
Discuss forum
Workplace
Report
5. Which data type should be more preferred for storing a simple number like 35 to improve execution speed of a program ?
A. sbyte B. short C. int D. long
View Answer
Discuss forum
Workplace
Report
Answer: Option A
Explanation:
Wider data type like int, long takes more time for manipulation of a program.
See More Information
Tutorial Link:
Published by:
Read More..
Online Test : Take an Online ASP.NET Aptitude Test Now!