C# Enumeration Aptitude Questions and Answers | Set 1

C# Enumeration Aptitude Questions | Set 1: This section contains aptitude questions and answers on C# Enumeration.
Submitted by Nidhi, on April 02, 2020

1) There are following statements are given below, which of them are correct about enumeration in C#?
  1. Enumeration is used to assign the names to integral constants, which makes the program readable.
  2. It is a reference data type.
  3. Enumeration is not supported in C#
  4. It is used only in VB.NET

Options:

  1. Only A
  2. Only B
  3. C and D
  4. B and C

2) There are following data types are given below, which of them cannot be used as an underlying data-type in the enumeration?
  1. int
  2. short
  3. byte
  4. float
  5. double

Options:

  1. Only C
  2. A and B
  3. D and E
  4. A, B and C

3) In C#.NET, which keyword is used to create an enumeration?
  1. enumerate
  2. enumeration
  3. Enum
  4. enum

4) Can we inherit enum values in C#.NET?
  1. Yes
  2. No

5) In C#.NET, enum is?
  1. Reference type
  2. Value type
  3. Both types
  4. Code type





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.