有以下程序: Class Date { public: Date(int y,int m,mt d); { year=y; month=m; day=d; } Date(int y=2000) { year=y; month=10; day=1; } Date(Date &D) { year=d.year; month=d.month; day=d.day; } Void prin
A: 2
B: 3
C: 4
D: 5
A: 2
B: 3
C: 4
D: 5
举一反三
- 以下结构体数组定义,不正确的是______。 A: struct date{ int year; int month; int day;}date1[10],date2[10]; B: struct{ int year; int month; int day;}date1[10],date2[10]; C: struct date{ int year; int month; int day;}; ..... struct datedate1[10],date2[10]; D: struct datedate1[10],date2[10];.....struct date{ int year; int month; int day;};
- 下列有关结构体的定义错误的是_______。 A: typedef date { int year,month,day ;} type_date; B: struct { char name[10] ; float angle ;}; C: typedef struct date { int year,month,day ;} type_date ; D: struct date { int year,month,day ;} type_date ;
- 下面结构体的定义语句中,不正确的是______。 A: structdate B: int month; C: int day; D: int year; E: Struct date datel; F: B.stmctdate G: intmonth; H: int day; I: int year; J: datel; K: struct L: int month; M: int day; N: int year; O: date 1; P: D. #define DATE stmct date Q: DATE R: int month; S: int day; T: int year; U: datel;
- It is usually to show the date in the order of day/month/year (American practice), or month/day/year (British practice).
- 设有如下语句 typedef struct Date { int year; int month; int day; } DATE; 则以下叙述中错误的是