using System;
public class Program
{
public static void Main(string[] args)
{
int[] arr = new int[8] {3, 7, 9, 0, 4, 2, 1, 8};
int startIndex = 2; // Start index for the subset
int length = 4; // Number of elements to take
int[] subset = new int[length];
Array.Copy(arr, startIndex, subset, 0, length);
Console.WriteLine("Subset: " + string.Join(", ", subset));
}
}
/*
run:
Subset: 9, 0, 4, 2
*/