题目内容

阅读以下说明和C代码,将应填入(n)处的字句写在对应栏内。
【说明】
将一正整数序列{K1,K2,…,K9}重新排列成一个新的序列,新序列中,比K1小的数都在K1的前面(左面),比K1大的数都在K1的后面(右面),最后调用writeDat()函数的新序列输出到文件out.dat中。
在程序中已给出了10个序列,每个序列有9个正整数,并存入数组a[10][9]中,分别求出这10个新序列。
例:序列{6,8,9,1,2,5,4,7,3}
经重排后成为{3,4,5,2,1,6,8,9,7}
【函数】
include < stdio. h >
include < conio. h >
void jsValue(int a [10] [9] )
{ int i,j,k,n,temp;
int b[9];
for(i=0;i<10;i++)
{ temp=a[i] [0];
k=8;n=0;
for(j=8;j=0;j--)
{ if(temp < a[i] [j]) (1)=a[i][j];
if(temp >a[i] [j]) (2)=a[i][j];
if(temp =a[i] [j]) (3)= temp;
}
for(j=0;j<9;j++) a[i][j] =b[j];
}
}
void main()
int a[10] [9] = {{6,8,9,1,2,5,4,7,3},{3,5,8,9,1,2,6,4,7},
{8,2,1,9,3,5,4,6,7}, {3,5,1,2,9,8,6,7,4},
{4,7,8,9,1,2,5,3,6}, {4,7,3,5,1,2,6,8,9},
{9,1,3,5,8,6,2,4,7}, {2,6,1,9,8,3,5,7,4},
{5,3,7,9,1,8,2,6,4}, {7,1,3,2,5,8,9,4,6}
};
int i,j;
(4);
for(i=0;i<10;i++) {
for(j=0;j<9;j++) {
printf("%d",a[i] [j] );
if((5))printf(",");
}
printf(" \n" );
}
getch();
}

查看答案
更多问题

阅读下列函数说明和C代码,将应填入(n) 处的字句写在对应栏内。
【说明】
函数print(BinTreeNode*t; DateType &x)的功能是在二叉树中查找值为x的结点,并打印该结点所有祖先结点。在此算法中,假设值为x的结点不多于一个。此算法采用后序的非递归遍历形式。因为退栈时需要区分右子树。函数中使用栈ST保存结点指针ptr以及标志tag,Top是栈顶指针。
【函数】
void print(BinTreeNode * t; DateType &x) {
stack ST; int i, top; top = 0;//置空栈
while(t! = NULL &&t-> data!= x || top!=0)
{ while(t!= NULL && t-> data!=x)
{
/*寻找值为x的结点*/
(1);
ST[top]. ptr = t;
ST[top]. tag = 0;
(2);
}
if(t!= Null && t -> data == x) { /*找到值为x的结点*/
for(i=1;(3);i ++)
printf("%d" ,ST[top]. ptr ->data);
else {
while((4))
top--;
if(top>0)
{
ST[top]. tag = 1;
(5);
}
}
}

请回答以下关于网络安全的使用和操作的问题1~5,把答案填到对应栏内。
什么是网络安全?

潘多拉的匣子(名词解释)

新神(名词解释)

答案查题题库