C# Structures Aptitude Questions and Answers | Set 2

C# Structures Aptitude Questions | Set 2: This section contains aptitude questions and answers on C# Structures.
Submitted by Nidhi, on April 10, 2020

1) An instance of a structure allocates space in?
  1. Data Segment
  2. Stack Segment
  3. Heap Segment
  4. Code Segment

2) Can we create a structure without any member?
  1. Yes
  2. No

3) If we created a variable of structure when it gets destroyed?
  1. It is garbage collected when it is not pointed by any reference.
  2. It destroyed automatically, when it goes outside the scope.
  3. We need to destroy it using the delete operator.
  4. We need to implement a destructor to destroy it.

4) In C#.NET, the structure tag name is mandatory?
  1. Yes
  2. No

5) In C#.NET, can we create a structure within a class?
  1. Yes
  2. No





Comments and Discussions!

Load comments ↻





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