注意:源程序存放在考生文件夹下的BLANKl.C中。
不得增行或删行,也不得更改程序的结构!

[试题]下列给定程序是建立一个带头结点的单向链表,并用随机函数为各结点数据域赋值。函数fun()的作用是求出单向链表结点(不包括头结点)数据域中的最大值,并且作为函数值返回。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <stdio.h>include <conio.h>include <stdlib.h>typedef struct aa{ int data;struct aa *next;} NODE;/*****
[主观题]以下程序中函数fun的功能是:构成—个如图所示的带头结点的单向链表,在结点的数据域中放入了具有两个字符的字符串。函数disp的功能是显示输出该单向链表中所有结点中的字符串。请填空完成函数disp。include<stdio.h>typedef struct node /*链表结点结构*/{ char sub[3];struct node *next;}Node;Node fun(char s) /* 建立链表*/{ ...... }void disp(Node *h){ Node *p;p=h-
[单选题]以下程序中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是A.main( ) { int *p; fun(p); ┆ } int fun(int *p) { int s; p=&s;}B.main( ) { int *p; fun(&p); ┆ } int fun(int **p) { int s; *p=&s;}C.#include<stdlib.h> main( ) { int *p; fun(&p); ┆ } int fun(
[单选题]以下程序段中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是______。A.main() { int *p; fun(p); …… } int fun(int *p) {int s; p=&s;}B.main() { int *p; fun(&p); …… } int fun(int **p) {int s; *p=&s;}C.# include<stdlib. h> main() {int *p; fun(&p); …… } i
[试题]给定程序中,函数fun的功能是将不带头节点的单向链表结点数据域中的数据从小到大排序。即若原链表结点数据域从头至尾的数据为:10、4、2、8、6,排序后链表结点数据域从头至尾的数据为:2、4、6、8、10。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。注意:源程序存放在考生文件夹下的BLANKl.C中。不得增行或删行,也不得更改程序的结构!
[单选题]以下程序段中,能够通过调用函数fun(),使main()函数中的指针变量p指向一个合法的整型单元的是( )。A.main() {int*p; fun(p); … } int fun(int*p) {int s; p=&s; }B.main {int*p fun(&p); … } iht fun(int**p) {int s; *p=&s;}C.main() {int*p; fun(&p); } int fun(int**p) {*p=(int*)malloc(2)
[主观题]以下程序中,函数fun的功能是计算x2-2x+6,主函数中将调用fun函数计算,请填空。y1=(x+8)2-2(x+8)+6y2=sin2(x)-2sin(x)+6 #include "math.h"double fun(double x){ return();}main(){double x,y1,y2; printf("Enter x:"); scanf("%1f,&x); y1=fun(8+x); y2=fun(); printf("y1=%1f,y2=%1f/n",
[单选题]以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请填空。 #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! =
[单选题]在函数调用过程中,如果函数fun A调用了函数fun B,函数fun B又调用了函数fun A,则A.称为函数的直接递归调用B.称为函数的间接递归调用C.称为函数的循环调用D.C语言中不允许这样的递归调用
[单选题]以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转储到链表的各个结点中,请从与下划线处号码对应的一组选若中选择出正确的选项。#include stuct node{ char data; struct node *next;}; (48) CreatLis(char *s){ struct node *h,*p,*q); h=(struct node *)malloc(sizeof(struct node)); p=q=h; while(*s!='/0') { p=