I have an array say a[3]={1,2,5} . I have to create another array a2[2]={2,5}.
What I have tried is to just create a new array a2[] and just copy all the elements from the required position range.
Is there any other method to accomplish this in C?.