In Objective C, you can easily read from a file into an NSData
object with something like this:
NSData *data = [NSData datawithContentsOFFile:filename];
You can then get the number of bytes in that object and allocate a C style integer array of matching size like this:
NSUInteger length = [data length];
int *cdata = (int*)malloc(length);
and copy the bytes out of the NSData
object into the C array like this:
[data getBytes:(void*)cdata length:length];
Don't forget to free the memory in the C array when you're done with it.
free(cdata);