OOPs Interview Question and Answers

36. What are the features of array?
 
  • An array may hold at most the number of elements specified by its size.
  • Elements are stored in the consecutive memory locations.
  • Accessing of array element by its subscript is easy.
  • Array may be one dimensional or multidimensional.
  • Arrays may be regular or jagged.
  • An Array instance created is always an array type.
 
Your Name Your Email-ID
Your Answer
37. Can you store multiple data types in System.Array?
  No
 
Your Name Your Email-ID
Your Answer
38. Define Constructor.
 
  • A constructor is a special method declared in a class to initialize the fields at the time of the creation of an instance/object of a class.
  • It is a special method because the name of the method is same as that of class name.
 
Your Name Your Email-ID
Your Answer
39. Define Destructor?
 
  • Strings are modifiable.
  • Created using String Builder Class.
 
Your Name Your Email-ID
Your Answer
40. What is called Default Constructor?
 
  • A public parameter less constructor called default constructor.
  • It returns a default values for the value type.
 
Your Name Your Email-ID
Your Answer
123456789101112 Page 8 of 12