I have started learning C (so, you know.. pointers).
I have this code:
#include <stdio.h>
#include <string.h>
int main (int argc, char* argv[])
{
char c = 'c';
char* cptr = &c;
printf("c = %c\n", c);
printf("*cptr = %c\n", *cptr);
printf("c address = %p\n", &c);
}
My output is:
c = c
*cptr = c
c address = 0x7fff0217096f
When I convert the hexadecimal above to decimal, I get: 140720994002157
My questions:
1) Does this decimal value represent the memory address? Isn't it too big?
2) How can I print the value of the pointer (which means the address of the c
variable) as a decimal?