int main(void) { int a = 10; int *p1 = &a; char ch = 'c'; char *p2 = &ch; printf("p1=>size:%d p2=>size:%d\n", sizeof(p1), sizeof(p2)); return 0; }
Ubuntu编译后的warning
src/pointer_basic.c: In function ‘main’:
src/pointer_basic.c:26:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
sizeof(p1), sizeof(p2));
^
src/pointer_basic.c:26:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
onemoo
jfhdibrbfjd
小萝卜腿
慕粉13052355856
leavie
lalm
jfhdibrbfjd
jfhdibrbfjd
一世沉香
留得枯荷听雨声lyx