B
Bill Cunningham
From a previous thread I was corrected in my syntax. My tutorial
demonstrates the address of pointers and pointees. I don't know if it's the
address they hold or their virtual address as assigned by kernel services
under the hood. But here's corrected code and a warning from my compiler.
#include <stdio.h>
int main()
{
int *p;
int a = 15;
p = &a;
printf("%p\n", (void *) &a);
printf("%p\n", (void *) a);
}
Very simple. I believethis is what I was told is correct now for compiler
stderr output.
p.c: In function 'main':
p.c:9:20: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
:Shrug:
demonstrates the address of pointers and pointees. I don't know if it's the
address they hold or their virtual address as assigned by kernel services
under the hood. But here's corrected code and a warning from my compiler.
#include <stdio.h>
int main()
{
int *p;
int a = 15;
p = &a;
printf("%p\n", (void *) &a);
printf("%p\n", (void *) a);
}
Very simple. I believethis is what I was told is correct now for compiler
stderr output.
p.c: In function 'main':
p.c:9:20: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
:Shrug: