1.

Choose the statement which defines the Nullable type Correctly:(a) A special version of a value type that is represented by a structure(b) A nullable type can also store the value null(c) Nullable types are objects of System.Nullable, where T must be a non nullable value type(d) All of the mentionedThe question was posed to me in an interview.The above asked question is from Pointers Operation in chapter Miscellaneous topics of C#

Answer»

The correct answer is (d) All of the mentioned

The explanation: 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 nonnullable value type.



Discussion

No Comment Found

Related InterviewSolutions