I'm in a sophomore C class and this project is about dealing with pointers and designing a memory dump function. So I've been able to struggle through the pointers and got a beginning and ending address to dump, even bitmasked it, and I wanted to initialize a char array with the beginning memory address. I initialize it with the same variable storing my masked beginning address but when I print the array, it contains a different memory address. Here's the function: 

```
void memDump(void *base, int bytes)
{
unsigned char *begin;
begin = base;//beginning of range of memory
unsigned char *end;// ending range of memory
end = base + bytes;
int a, b;
long long int d=base;
d=d&0xFFFFF0; //trying to bitmask
long long int e=end;
e = e&0xFFFF0; //masked off the beginning and ending range
char c[16]={d}; //loop variables
printf("%x", c);

for (a=begin; a<=end; a+=16)
    {
        printf("\n%016X\n", d);
        printf("%016X\n", a);
        printf("%016X", e);
    }

}

```

Sorry guys, i can't find something similar and this is my last resort. Thanks! 

Update: Thanks for the insight everyone, reading some more about C and some articles on how to debug helped me out.