#include <stdio.h>
#define rstype_t long // type of the array
typedef struct {
rstype_t *b, *e; // begin and end of each bucket
} rsbucket_t;
int main(){
int size=8;
rstype_t *beg;
rsbucket_t *k, b[size], *be = b + size; // b[] keeps all the buckets
for (k = b; k != be; ++k){
k->b = k->e = beg;
printf("b=%ld, e=%ld
", k->b, k->e); // 输出 b=4202800, e=4202800
}
printf("b=%ld, e=%ld
", k->b, k->e); // 输出 b=8, e=4203809
return 0;
}
输出
b=4202800, e=4202800
b=4202800, e=4202800
b=4202800, e=4202800
b=4202800, e=4202800
b=4202800, e=4202800
b=4202800, e=4202800
b=4202800, e=4202800
b=4202800, e=4202800
b=8, e=4203809
问一下 同样的输出语句,为什么最后一行输出的和上面的不一样啊
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…