C语言基础:输出数组的内存地址
#include <stdio.h> int main(void) { int count[10]; float salaries[5]; long distances[10]; printf("Address of the array count is %x\n", count); printf("Address of the array salaries is %x\n", salaries); printf("Address of the array distances is %x\n", distances); return 1; }
输出结果
Address of the array count is 6c4c0160 Address of the array salaries is 6c4c014c Address of the array distances is 6c4c00f8