C言語における一次元配列とポインタの関係

一次元配列のメモリ上の配置 #include <stdio.h> int main() { int numbers[8]; int index; for (index = 0; index < 8; index++) { printf("int型のサイズ: %zu ", sizeof(int)); printf("&numbers[%d] = %p ", index, &numbers[index]); } return 0; } int型のサイズ: 4 &numbers[0] = 0 ...

6月11日 19:39 投稿