MCQs
A nullable type is a special version of the value type that is represented by a structure. In addition to the values defined by the underlying type, a nullable type can also store the value null. Thus, a nullable type has the same range and characteristics as its underlying type. It simply adds the ability to represent a value which indicates that a variable of that type is unassigned. Nullable types are objects of System.
Nullable, where T must be a non- nullable value type.
Compares the string referred to by strA with strB. Returns greater than zero if strA is greater than strB, less than zero if strA is less
than strB, and zero if strA and strB are equal. The comparison is case and culture-sensitive
Here '+' operator works as concatenation for strings.
Output : Hello c Sharp
Here, a = 2, a + 1 = 2 + 1 = 3.
So, a = 2, b = 3.
x = 2 + 3 = 5.
y = 5 + 3 = 8.
Similarly, a = 5, b = a + 1 = 4.
y = 5 + 4 = 9.
Output : 5, 9.
class UnsafeCode
{
unsafe static void Main()
{
int n = 10;
int* p = &n;
Console.WriteLine(*p);
}
}
Output : 10 + 1 = 11.
Output:FBCDE