c printf 输出格式

#include <stdio.h>

int main(int argc, char const *argv[])
{
	int *a[2][3];
	printf("%lu\n", sizeof(a));
	printf("%d,%4u,%lu\n", 4294967295u, 4294967295u, -1);
	return 0;
}

本机为mac os 64bit

clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
/Users/lyd/Desktop/Aliba.c:7:51: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
        printf("%d,%4u,%lu\n", 4294967295u, 4294967295u, -1);
                       ~~~                               ^~
                       %d
1 warning generated.
48
-1,4294967295,4294967295
[Finished in 0.1s]


你可能感兴趣的:(c printf 输出格式)