第29338题 单选题
下列关于C++字符数组内存分配与操作的说法中,正确的是?
#include <iostream>
#include <cstring>
using namespace std;

int main() {
    // 以下代码与选项相关
    char arr1[] = "C++";
    char* ptr1 = new char[10];
    char arr2[5] = "hello";
    char arr3[10];
    return 0;
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析