單項選擇題以下程序的輸出結(jié)果為()。#includevoidmain(){structnode{intn;structnode*next;}a[4];inti;for(i=0;i<3;i++){(a+i)–>n=i+1;(a+i)->next=a+i+1;}(a+i)->next=a;printf("%d,%d\n",(a[1].next)->n,a[3].next->n);}

A.1,2
B.2,1
C.1,3
D.3,1


您可能感興趣的試卷

你可能感興趣的試題

3.單項選擇題若有以下定義語句:structstudent{intnum;charname[9];}stu[2]={1,"zhangsan",2,"lisi"};則以下能輸出字符串“l(fā)isi”的語句是()。

A.printf("%s",stu[0].name)
B.printf("%s",&stu[1].name)
C.printf("%s",stu[1].name[0])
D.printf("%s",&stu[1].name[0])

5.單項選擇題有以下的定義語句:structstudent{intnum;charname[9];};則不能正確定義結(jié)構(gòu)數(shù)組并賦初始值的是()。

A.structstudentstu[2]={1,"zhangsan",2,"lisi"};
B.structstudentstu[2]={{1,"zhangsan"},{2,"lisi"}};
C.structstu[2]={{1,"zhangsan"},{2,"lisi"}};
D.structstudentstu[]={{1,"zhangsan"},{2,"lisi"}};