Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Datatypes Questions
C#.NET — What is the default value of the Boolean type (bool)?
C#.NET — Identify the value types among the following: Integer, Array, Single, String, Long.
C#.NET — Initialize two variables i and j to 10 each: which statements are valid?
C#.NET — Evaluate the expression and predict the output. int x = 1; float y = 1.1f; short z = 1; Console.WriteLine((float)x + y * z - (x += (short)y));
C#.NET — Set a constant value 3.14 for pi so it cannot be modified later: choose the correct construct.
C#.NET — Understand arithmetic promotions and overflow behavior. Given: short s1 = 20; short s2 = 400; int a; a = s1 * s2; What happens?
C#.NET — Which of the following is NOT an integer type in the sense used by this question?
C#.NET — Data type rules: choose the correct set of statements. Assigning an integer literal to a byte variable that exceeds byte range causes a compilation error. Non-literal numeric types of larger storage size cannot be implicitly converted to byte. Byte cannot be implicitly converted to float. A char can be implicitly converted only to int. We can cast integral character codes explicitly.
In C#.NET data types and memory representation, what is the storage size of the built-in Decimal (System.Decimal) value type? Choose the most accurate size in bytes.
Type conversion in C#.NET and VB-style helpers: which statement is correct? Consider these claims about conversions and literals: • Information is never lost during narrowing conversions. • The CInteger() helper can convert a Single to an Integer. • Widening conversions take place automatically. • Assigning an Integer to an Object variable is called unboxing. • The literal 3.14 can be treated as Decimal using the suffix F.
Boxing, unboxing, and nullability in C#.NET — identify the correct statements. 1) We can assign values of any type to variables of type object. 2) Converting a value type to object is called unboxing. 3) Converting an object back to a value type is called boxing. 4) A Boolean variable cannot have a value of null (without Nullable). 5) When a value type is boxed, a new object must be allocated and constructed on the managed heap.
Integral types in C#.NET — which of the following is an 8-byte signed integer type?
C#.NET data types — which statements are correct? 1) Each value type has an implicit default constructor that initializes the type's default value. 2) A value type can contain the null value. 3) All value types implicitly derive from System.ValueType. 4) It is not essential that local variables be definitely assigned before use. 5) Variables of reference types store references (not the actual object data).
Unsigned vs signed storage in C#.NET — which of the following types does not store a sign bit?
Given the declarations below, which statement correctly assigns the value 33 to variable c in C#? byte a = 11, b = 22, c;
What is the correct storage size for the Decimal (System.Decimal) data type in C#.NET? Select the best answer in bytes.
C#.NET types and the Common Type System (CTS) — which statements are correct? 1) Every data type is either a value type or a reference type. 2) Value types are always created on the heap. 3) Reference types are always created on the stack. 4) Mapping of each value type to a CTS type facilitates interoperability. 5) Every reference type maps to a CTS type.