有以下程序#include typedef struct{char name[10];int age;} ST;main(){ ST stud[10]={ "Adum", 15,"Muty", 16,"Paul", 17,"Johu", 14,};┋}程序运行后不能输出字符u的语句是
A. printf("%c\n", stud[0].name[3] );
B. printf("%c\n", stud[3].name[3] );
C. printf("%c\n", stud[2].name[2] );
D. printf("%c\n", stud[1].name[1] );
查看答案
有如下程序#include struct person{char name[10];int age;}main(){struct person room[4] = {{"Zhang", 19}, {"Li", 20}, {"Wang", 17}, {"Zhao", 18}};printf("%s:%d\n", (room+2)->name, room->age);}程序运行后的输出结果是
A. Wang:19
B. Wang:17
C. Li:20
D. Li:19
有如下程序#include #include struct S{char name[10];};void change(struct S *data, int value){strcpy(data->name, "****");value = 13;}main(){struct S input;int num = 4;strcpy(input.name, "THIS");change(&input, num);printf("%s,%d\n", input.name, num);}程序运行后的输出结果是
A. ****,4
B. ****,13
C. THIS,4
D. THIS,13
有如下程序#include #include struct S{char name[10];};main(){struct S s1, s2;strcpy(s1.name, "12345");strcpy(s2.name, "ABC");s1 = s2;printf("%s\n", s1.name);}程序运行后的输出结果是
ABC
B. ABC45
C. 12345
D. ABC12
有以下程序#include struct S{ int a; int *b;};main(){ int x1[ ]={3,4},x2[ ]={6,7};struct S x[ ]={1,x1,2,x2};printf("%d,%d\n",*x[0].b,*x[1].b);}程序的运行结果是
A. 3,6
B. 1,2
C. 4,7
D. 变量的地址值