执行下面的 C++ 代码,会输出 8,因为两个指针地址相差 8 个字节(假设 int 占 4 个字节)。 int arr[5] = {1, 2, 3, 4, 5}; int* p1 = arr; int* p2 = arr + 2; cout << p2 - p1; // 输出结果