Basic C# Interview Questions on arrays

Q : What is an array?

Ans : An array is a data structure that contains several variables of the same type.

Q : What are the 3 different types of arrays?

Ans : 1. Single-Dimensional
2. Multidimensional
3. Jagged

Q : What is Jagged Array?

Ans : A jagged array is an array of arrays.

Q : Are arrays value types or reference types?

Ans : Arrays are reference types.

Q : What is the base class for Array types?

Ans : System.Array

Q : Can you use foreach iteration on arrays in C#?

Ans :Yes,Since array type implements IEnumerable, you can use foreach iteration on all arrays in C#.

     
Leave a Reply
Name (required)
Email (will not be published) (required)
Web Site

List of Top Hospitals in India