Copying a subset of an array into another array / array slicing in C
In C, is there any built-in array slicing mechanism? Like in Matlab for example, A(1:4) would produce = 1 1 1 1 How can I achieve this in C? I tried looking, but the closest I could find is this: http://cboard.cprogramming.com/c-programming/95772-how-do-array-subsets.html subsetArray = &bigArray[someIndex] But this does not exactly return the sliced array, instead pointer to the first element of the sliced array... Many thanks Doing that in std C is not possible. You have to do it yourself. If you have a string, you can use string.h library who takes care of that, but for integers there's no