若有以下定义,则对变量student1中“生日”的正确赋值方式是( )。struct student{ int num; char name[20], sex; struct { int year, month, day; } birthday;} ; struct student student1; A: student1.birthday.year = 2003;student1.birthday.month = 5;student1.birthday.day = 1; B: year = 2003;month = 5;day = 1; C: birthday.year = 2003;birthday.month = 5;birthday.day = 1; D: student1.year = 2003;student1.month = 5;student1.day = 1;
若有以下定义,则对变量student1中“生日”的正确赋值方式是( )。struct student{ int num; char name[20], sex; struct { int year, month, day; } birthday;} ; struct student student1; A: student1.birthday.year = 2003;student1.birthday.month = 5;student1.birthday.day = 1; B: year = 2003;month = 5;day = 1; C: birthday.year = 2003;birthday.month = 5;birthday.day = 1; D: student1.year = 2003;student1.month = 5;student1.day = 1;
Student of the month
Student of the month
已知对学生记录的描述为: struct student { int num; char name[20],sex; struct{ int year,month,day;}birthday; }; struct student stu; 设变量stu中的“生日”是“1995年11月12日”,对“birthday”正确赋值的程序是______。
已知对学生记录的描述为: struct student { int num; char name[20],sex; struct{ int year,month,day;}birthday; }; struct student stu; 设变量stu中的“生日”是“1995年11月12日”,对“birthday”正确赋值的程序是______。
若有以下定义,则对变量student1中“生日”的正确赋值方式是( )。 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;
若有以下定义,则对变量student1中“生日”的正确赋值方式是( )。 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;
9.若有以下定义,则对变量student1中“生日”的正确赋值方式是 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;
9.若有以下定义,则对变量student1中“生日”的正确赋值方式是 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;
程序:class Birthday{int year;int month;int day;public Birthday(int year,int month,int day){year = year; month = month; day = day;}public static void main(String[] args){Birthday birth = new Birthday(1980,10,22); System.out.println(year);}}程序运行后的输出是哪项? A: 1980 B: 10 C: 22 D: 0 E: 编译出错
程序:class Birthday{int year;int month;int day;public Birthday(int year,int month,int day){year = year; month = month; day = day;}public static void main(String[] args){Birthday birth = new Birthday(1980,10,22); System.out.println(year);}}程序运行后的输出是哪项? A: 1980 B: 10 C: 22 D: 0 E: 编译出错
下面结构体的定义如下:struct student{ char name[32]; struct date{ int day; int month; int year; }birthday;};错误的初始化语句是: A: struct student s1={'Li',1,1,2000}; B: struct student s1={"Li",{1,1,2000}}; C: struct student s1={"Li",1,1,2000}; D: struct student s1={"Li",1,1};
下面结构体的定义如下:struct student{ char name[32]; struct date{ int day; int month; int year; }birthday;};错误的初始化语句是: A: struct student s1={'Li',1,1,2000}; B: struct student s1={"Li",{1,1,2000}}; C: struct student s1={"Li",1,1,2000}; D: struct student s1={"Li",1,1};
下面结构体的定义如下:struct student{ char name[32]; struct date{ int day; int month; int year; }birthday;};错误的初始化语句是: A: struct student s1={'Li',1,1,2000}; B: struct student s1={"Li",{1,1,2000}}; C: struct student s1={"Li",1,1,2000}; D: struct student s1={"Li",1,1};
下面结构体的定义如下:struct student{ char name[32]; struct date{ int day; int month; int year; }birthday;};错误的初始化语句是: A: struct student s1={'Li',1,1,2000}; B: struct student s1={"Li",{1,1,2000}}; C: struct student s1={"Li",1,1,2000}; D: struct student s1={"Li",1,1};
下面结构体的定义如下:struct student{ char name[32]; struct date{ int day; int month; int year; }birthday;};错误的初始化语句是: A: struct student s1={"Li",{1,1,2000}}; B: struct student s1={'Li',1,1,2000}; C: struct student s1={"Li",1,1,2000}; D: struct student s1={"Li",1,1};
下面结构体的定义如下:struct student{ char name[32]; struct date{ int day; int month; int year; }birthday;};错误的初始化语句是: A: struct student s1={"Li",{1,1,2000}}; B: struct student s1={'Li',1,1,2000}; C: struct student s1={"Li",1,1,2000}; D: struct student s1={"Li",1,1};
定义如下结构体来描述一个人的基本情况: struct date {int year; int month; int day; }; struct person {char name[20]; char sex; struct date birthday; }man;如果某人的生日是1988年10月9日,下列对生日的正确赋值是 。 A: man·birthday·year=1988 man·birthday·.month=10 man·birthday·day=9 B: birthday·year=1988birthday·month=10birthday·day=9 C: man·year=1988man·month=10man·day=9 D: year=1988 month=10 day=9
定义如下结构体来描述一个人的基本情况: struct date {int year; int month; int day; }; struct person {char name[20]; char sex; struct date birthday; }man;如果某人的生日是1988年10月9日,下列对生日的正确赋值是 。 A: man·birthday·year=1988 man·birthday·.month=10 man·birthday·day=9 B: birthday·year=1988birthday·month=10birthday·day=9 C: man·year=1988man·month=10man·day=9 D: year=1988 month=10 day=9