设 struct t { int a; float b; char c[10]; } x[2]={{1 , 6.6 , "Dollar" } , { 2 , 9.8 , "Pound" } } ; 则执行语句printf("%d , %s", x[1].a, x[1].c);后输出结果是
A、1,Dollar
B、2,Dollar
C、1,Pound
D、2,Pound
【正确答案】:D
【题目解析】:x[2]={{1 , 6.6 , "Dollar" } , { 2 , 9.8 , "Pound" } } 可写成:
x[0]={1,6.6,“Dollar”};x[1]={ 2 , 9.8 , "Pound" }, x[1].a=2; x[1].c=Pound
设 struct t { int a; float b; char c[10]; } x[2]={{1 , 6.6
- 2024-08-04 10:46:18
- 高级语言程序设计(一)(00342)