Home » Aptitude Questions and Answers » C# Aptitude Questions and Answers

C# Enumeration Aptitude Questions and Answers | Set 2

C# Enumeration Aptitude Questions | Set 2: 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. A variable of enum cannot have a private access specifier.
  2. A variable of enum cannot have a protected access specifier.
  3. A variable of enum cannot have a public access specifier.
  4. We can define a variable of enum inside a class or a namespace.

Options:

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

2) There are following statements are given below, which of them are correct about enumeration in C#?
  1. int is a default underlying data type of enum.
  2. We cannot print elements of enum in the form of string.
  3. Every enum created in C#.Net is derived from Object class.
  4. We need to use an implicit cast to convert enum type to an integral type.

Options:

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

3) Can we declare an enum inside the class?
  1. Yes
  2. No

4) Is it true, the value of each successive enum is decreased by 1?
  1. Yes
  2. No

5) Is it true, the value of each successive enum is increased by 1?
  1. Yes
  2. No






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.