#include <stdio.h> int main(void) { int b[6] = {3,-1,-4,0,5}; printf("b[5]与b[3]相差%d个单元\n",&b[5] - &*(b+3)); return 0; }
输出结果:
b[5]与b[3]相差2个单元 -------------------------------- Process exited after 0.01435 seconds with return value 0 请按任意键继续. . .