Wednesday, 23 March 2011

Array Interview questions

What is an Array?
An array is a type of data structure that is used to store variables of same data type.

What are the different types of arrays?
1. Single-Dimensional

int[] arrayname = new int[size of array];

2. Multidimensional: int[ , ] arrayname = new int[2,3];

3. Jagged : It is array of array.
int[][] arrayname = new int[2][];

Arrays are value types?yes or no

no,Arrays are reference types.

What is the base class for Array types?

No comments:

Post a Comment