‹ 上一题 下一题 ›

g4-03929. GESP-4级-2024-09-单选-第06题 未做

在 C++ 中,( )正确定义一个名为 student 的结构体,其中包含一个 name 字符数组和一个 age 整数?

  • A. ```cpp
    struct student { char name[20]; int age; };
- **B.** ```cpp
student struct { char name[20]; int age; };
  • C. ```cpp
    student struct { string name; int age; };
- **D.** ```cpp
struct student { char[20] name; int age; };
未选择
输入
输出

            
答案