求指教,请帮忙判断下面程序的运行结果(),该怎么选择?

请判断下面程序的运行结果()
#include<stdio.h>
int main()
{
structKeyWord
{
charKey[20];
intID;
}kw[]={"void",1,"char",2,"int",3,"float",4,"double",5};
printf("%c,%d\n",kw[3].Key[0],kw[3].ID);
}

(10.0分)
A i, 3
B n, 3
C f, 4
D l, 4

至尊宝的传说
浏览 328回答 1
1回答

MYYA

选Ckw可以写清楚点:struct&nbsp;kw[]={{"void",1},{"char",2},{"int",3},{"float",4},{"double",5}};分开来写就是:kw[0]&nbsp;=&nbsp;{"void",1};kw[1]&nbsp;=&nbsp;{"char",2};kw[2]&nbsp;=&nbsp;{"int",3};kw[3]&nbsp;=&nbsp;{"float",4};kw[4]&nbsp;=&nbsp;{"double",5};很显然kw[3].Key[0]就是float的第一个字符也就是fkw[3].ID就是4
打开App,查看更多内容
随时随地看视频慕课网APP