已知stu = ('李明',18,'四川'),print(stu[1])的输出结果为____________
举一反三
- 以下类的定义错误的是() A: class Stu: def Aa(self): print("aaaa") B: class Stu: a=10 C: class Stu: count=10; say(): print("Hello") D: class Stu: pass
- 根据下面的定义,能输出字符串"Li"的语句是()。struct person{char name[10];int age;};person stu[10]={"Zhang",18,"Li",17,"Ma",18,"Huang",18 };? cout<<;stu[1].name[0]<<endl;|cout<<;stu[2].name[0]<<endl;|cout<<;stu[1].name<<endl;|cout<<;stu[2].name<<endl;
- 对以下定义,能输出字符串"Mary"的语句是( )。struct student { char name[20]; int age; }; struct student stu[100]={"John",16,"Paul",17,"Mary",18 }; A: printf("%s",stu[2].name); B: printf("%s",stu[1].name); C: printf("%s",stu[2]); D: printf("%s",stu[1]);
- 已知有typedef struct student STU;下面和struct student s1;等效的是?() A: STU s1; B: student STU s1; C: struct STU s1; D: typedef STU s1;
- 有以下程序段,输出结果为()。 #include<stdio.h> struct student {int num; char name[20]; float score; }; main() {struct student stu[5]; printf("%d",sizeof(stu)); }