int *arrayOfInts = (int *)malloc(sizeof(int)*100); // ... initialize the array with input
What I'm trying to do is make another pointer that can point to specific locations in arrayOfInts. Say for example I want to offset the array by 5 elements (to point to the 5th integer).
int *localArrayOfInts = arrayOfInts + 5;
Seems like this should work to me from basic pointer arithmetic but it's not working for me. Is there anything wrong with this?