An Array of arrays.In Jagged Array each dimension size is different.
class JaggedArray
{
static void Main(string[] args)
{
int [][] jagged=new int [3][];
jagged[0]=new int[4];
jagged[1]=new int[3];
jagged[2]=new int[5];
int i;
//storing value in first array
Console.WriteLine("Enter Value For First Array");
for (i = 0; i < jagged[0].Length; i++)
{
jagged[0][i] = int.Parse(Console.ReadLine());
}
Console.WriteLine("Enter Value For Second Array");
for (i = 0; i < jagged[1].Length; i++)
{
jagged[1][i] = int.Parse(Console.ReadLine());
}
Console.WriteLine("Enter Value For Third Array");
for (i = 0; i < jagged[2].Length; i++)
{
jagged[2][i] = int.Parse(Console.ReadLine());
}
Console.WriteLine("Display Value For Of Arrays");
Console.WriteLine("Value For First Array::");
for (i = 0; i < jagged[0].Length; i++)
{
Console.WriteLine(jagged[0][i]);
}
Console.WriteLine("Value For Second Array::");
for (i = 0; i < jagged[1].Length; i++)
{
Console.WriteLine(jagged[1][i]);
}
Console.WriteLine("Value For Third Array::");
for (i = 0; i < jagged[2].Length; i++)
{
Console.WriteLine(jagged[2][i]);
}
Console.ReadLine();
}
}