Yes, I made a mistake, I thought the %p took care of that for me (I thought I was supposed to pass the pointer's address to it for some reason, which makes no sense in retrospect).
I edited my above post, thanks.
Edit: any recommendations or advice?
Code:
#include <stdio.h>
int main ()
{
int myArray[] = {5, 6, 7, 8};
int * myPointer = &myArray[0];
printf("Print address of beginning of array of 4-byte integers:\n");
// print address of myArray[0]
printf("&myArray[0]:\t0x%08lx\n", (unsigned long)myPointer);
printf("&myArray[0]:\t%p\n", (void*)&myArray[0]);
printf("&myArray[0]:\t%p\n", (void*)myPointer);
// print address of next element of the array
printf("&myArray[1]:\t0x%08lx\n", (unsigned long)(myPointer+1));
printf("&myArray[1]:\t%p\n", ((void*)&myArray[0])+sizeof(int));
printf("&myArray[1]:\t%p\n", ((void*)myPointer)+sizeof(int));
return 0;
}