C语言基础:两个获取数组地址的方法
#include <stdio.h>
int main(void)
{
int count[10];
float salaries[5];
long distances[10];
printf("Address of the array count is %x &count is %x\n",
count, &count);
printf("Address of the array salaries is %x &count is %x\n",
salaries, &salaries);
printf("Address of the array distances is %x &distances is %x\n",
distances, &distances);
return 1;
}
输出结果
Address of the array count is 669d40e0 &count is 669d40e0 Address of the array salaries is 669d40cc &count is 669d40cc Address of the array distances is 669d4078 &distances is 669d4078
