单项选择题
有以下程序:
#include <stdio, h>
void fun(iht * a,int i,int j)
int t;
if(i < j)
t=a[i];a[i] =a[j] ;a[j]=t;
i++;j--;
fun(a,i,j);
main ( )
int x[ ]: 2,6,1,8 ,i;
fun(x,0,3);
for( i=0;i <4;i ++ ) printf( "%2d" ,x[i] );
printf(" \n");
A.1268
B.8621
C.8162
D.8612
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include <stdio.h> main ( ) int i; for(i =0;i <3 ;i ++ ) switch (i) case 0: printf( % d ,i); case 2: printf( % d , i); default: printf( % d , i);程序运行后的输出结果是( )。
A.022111
B.021021
C.000122
D.012
点击查看答案&解析
单项选择题
以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请填空。 #include <stdlib.h> stuct node char data; struet node * next; ; stntct node * CreatList(char * s) struet node *h,*p,*q; h = (struct node * ) malloc(sizeof(struct node) ); p=q=h; while( * s! =’ 0’) p = (struct node *) malloc ( sizeof(struct node) ); p - > data = ( ) q- >next=p; q=p; a++; p- > next =’ 0’; return h; main( ) char str[ ]= link list ; struet node * head; head = CreatList(str);
A.*s
B.s
C.*s++
D.(*s)++
点击查看答案&解析
相关试题
以下程序运行后的输出结果是 【20】 。...
以下程序通过函数SunFun()调用F(x),x...
以下程序段的输出结果是 【15】 。 in...
以下程序从终端读入数据到数组中,统计其中...
以下程序运行后的输出结果是 【14】 。...