After the following declaration, you can define and initialize a variable birth of this structure type as follows ____. struct Date { int month; int day; int year; };
A. Date birth = {12, 28, 1987};
B. struct Date birth = {12, 28, 1987};
C. Date birth = {12; 28; 1987};
D. struct Date birth = {12; 28; 1987};
查看答案
____ is NOT a valid C statement.
A. struct {int month; int day; int year;} birth;
B. struct {int month; int day; int year;} birth, current;
C. struct Date {int month; int day; int year;};
D. struct {int month, int day, int year} birth;
The -> operator has a higher priority than the increment operator.
The declaration for a union is identical in form to a structure declaration, with the reserved word union used in place of the reserved word struct.
When working with unions, typically a second variable keeps track of the current data type stored in the union.