...
#include <stdio.h> #include <unistd.h> int main(void) { int A[256] = {0}; size_t num = (int *)(&A + 1) - (int *)&A; size_t len = (char *)(&A + 1) - (char *)&A; printf("数组元素个数是 %zd 字节总长度是 %zd ", num, len); return 0; } [fh@dell Trash]$ ./a.out 数组元素个数是 256 字节总长度是 1024
...