14
สแต็กเติบโตขึ้นหรือลง?
ฉันมีรหัสชิ้นนี้ใน c: int q = 10; int s = 5; int a[3]; printf("Address of a: %d\n", (int)a); printf("Address of a[1]: %d\n", (int)&a[1]); printf("Address of a[2]: %d\n", (int)&a[2]); printf("Address of q: %d\n", (int)&q); printf("Address of s: %d\n", (int)&s); ผลลัพธ์คือ: Address of a: 2293584 Address of a[1]: 2293588 Address of a[2]: 2293592 …