首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请从与下划线处号码对应的一组选项中选择出正确的选项。 #include <stdlib.h> struct node { char data; s
以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请从与下划线处号码对应的一组选项中选择出正确的选项。 #include <stdlib.h> struct node { char data; s
admin
2010-01-10
29
问题
以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请从与下划线处号码对应的一组选项中选择出正确的选项。
#include <stdlib.h>
struct node
{ char data; struct node *next;};
(48) CreatList(char *s)
{ struct 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=(49);
q->next=p;
q=(50);
s++;
}
p->next=0;
return h;
}
main()
{ char str[]="link list";
struct node *head;
head=CreatList(str);
}
选项
A、*s
B、S
C、*s++
D、(*s)++
答案
1
解析
转载请注明原文地址:https://jikaoti.com/ti/W6I0FFFM
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
编写如下程序:PrivateSubCommandl_Click()DimnumAsInteger,kAsInteger,nAsIntegernum=InputBox("请输入一个正整数:")k=numn=2
在窗体上画一个命令按钮,名称为Command1,然后编写如下代码:OptionBase0PrivateSubCommand1_Click()DimA1(4)AsInteger,A2(4)AsInteger
假定有如下程序:PfivmeSubForm_Click()Dima(4)AsInteger,b(4)AsIntegerFork=0To2a(k+1)=Val(InputBox(“请输入一个整数:”))b(3-k)=a(k+1)N
窗体上有1个名称为Commandl的命令按钮;1个名称为List1、没有列表项的列表框。编写如下程序:PrivateSubCommandl_Click()DimxAsString,sAsString,tempAsString
以下能从字符串“VisualBasic”中直接取出子字符串“Basic”的函数是()。
下列叙述中正确的是
以下叙述中错误的是
下面可以作为软件需求分析工具的是()。
在数据管理技术发展的三个阶段中,数据共享最好的是
软件按功能可以分为:应用软件、系统软件和支撑软件(或工具软件)。下面属于系统软件的是
随机试题
音爆是飞行器在突破音障时,由于对空气的压缩无法迅速传播,会逐渐形成激波面,激波面上高度集中的声学能量引起巨大响声,让人耳感受到短暂而极其强烈的爆炸声。音爆只有在突破音障即超音速飞行时才会产生。音爆云则是以飞行器为中心轴、从机翼前段开始向四周均匀扩散的圆锥状
39.材料1:党的十五大从发展进程角度总结了社会主义初级阶段九个方面的特征。第一,社会主义初级阶段是逐步摆脱不发达状况,基本实现社会主义现代化的历史阶段。第二,这个阶段,是由农业人口占很大比重,主要依靠手工劳动的农业国,逐步转变为非农业人口占多数,包含现代
A.tRNAB.IncRNAC.scRNAD.miRNA能与mRNA3’端非翻译区结合而抑制翻译的RNA分子是
流行病学中的人群是指
()是指房地产经纪信息的价值并不是一次性的,它常常可以重复使用,而且随着信息的累积,将会有新的价值产生。
下列税种中采用超率累进税率方式征收的是()。
某数加上6,乘以6,减去6,除以6,其结果等于6,则这个数是多少?
Asiftheyneededanymoreexcuse,newresearchsuggestsmenneedtheirsleepifthey’retolivealonglife.Women,ontheothe
ReadthetextbelowandanswerQuestions28-40.BattleoftheBagTheworldhasdeclaredwaronthe
Completethenotesbelow.WriteNOMORETHANTWOWORDSAND/ORANUMBERforeachanswer.AnOverviewofTheResearchonAmberAmb
最新回复
(
0
)