测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A20946. 在64位操作系统下(LP64 / LLP64 模型),下面代码的输出结果是( )。#include <iostream> using namespace std; int main() { int a[4] = {1, 2, 3, 4}; int (*p)[4] = &a; int *q = a; cout << sizeof(a) << " "; cout << sizeof(p) << " …

单选题 困难

题目描述

在64位操作系统下(LP64 / LLP64 模型),下面代码的输出结果是(    )。

#include <iostream>
using namespace std;

int main() {
    int a[4] = {1, 2, 3, 4};
    int (*p)[4] = &a;
    int *q = a;

    cout << sizeof(a) << " ";
    cout << sizeof(p) << " ";
    cout << sizeof(q + 1) << " ";
    cout << (p + 1) - p << " ";
    cout << (q + 1) - q << endl;
}

选项(单选)

上一题 下一题