I have an array of unsigned long that I expect to be 4 bytes per array element (32 bits), like this:
unsigned long giantbuffer[1024];
However, when I Print out the address of my array elements I get:
printf("%X\n", &giantbuffer[0]); --> gives ab8470
printf("%X\n", &giantbuffer[1]); --> gives ab8478
also,
sizeof(giantbuffer) gives 8192, and sizeof(giantbuffer[0]) gives 8.
That is eight bytes per array element! Is this something that is dependent on system architecture or something? I am new to C, so maybe this is an obvious thing? This wreaks havoc with my pointer arithmetic. I am using "ch" to do some interpreter command-line style checking of my syntax, etc. Maybe this is a problem with that program?