arrays_quiz.md - brainchildservices/curriculum GitHub Wiki

  1. Define Single dimensional Array ?

    The one dimensional array or single dimensional array in C# is the simplest type of array that contains only one row for storing data. It has single set of square bracket (“[]”). To declare single dimensional array in C#

  2. Define Multi-Dimensional Array ?

    When the number of dimensions specified is more than one, then it is called as a multi-dimensional array. Multidimensional arrays include 2D arrays and 3D arrays.

  3. What is Jagged Arrays ?

    An array whose elements are arrays is known as Jagged arrays it means “array of arrays“. The jagged array elements may be of different dimensions and sizes. Below are the examples to show how to declare, initialize, and access the jagged arrays.

  4. How to declare an array in C# ?

    datatype[] arrayName;

    eg :- double[] balance;

  5. How to Assigning Values to an Array ?

    You can assign values to individual array elements, by using the index number

    eg :- double[] balance = new double[10]; balance[0] = 4500.0;

  6. How to Accessing Array Elements ?

    An element is accessed by indexing the array name. This is done by placing the index of the element within square brackets after the name of the array.

    eg :- double salary = balance[9];

  7. What is Arrays Covariance ?

    Covariance for arrays enables implicit conversion of an array of a more derived type to an array of a less derived type. But this operation is not type safe