题目
题目

CEA3201 17984 MAIN - Computer Programming for Engineers Final exam CEA 3201 theory

单项选择题

Which of the following correctly declares a structure?  

选项
A.struct { int x; float y;};
B.structure abc {int x;};
C.struct abc int x;
D.struct abc ={int x;};
查看解析

查看解析

标准答案
Please login to view
思路分析
Here is a step-by-step analysis of each answer option to understand why one fits the syntax rules for declaring a structure, while the others do not. Option 1: 'struct { int x; float y;};' This option uses the keyword struct followed by an anonymous struct body containing two members, int x and float y, and ends with a semicolon. In C and C++, declaring a struct this way defines an unnamed struct type. While some c......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!