填空题

以下函数把b字符串连到a字符串的后面,并返回a中新字符串的长度,请填空。
strcen(char a[],char b[])
int num=0,n=0;
while(*(a+num)!= 【13】 )num++;
while(b[n])*(a+num)=b[n];num++; 【14】 ;
return num;

【参考答案】

[13]’\0’
[14]n++
<上一题 目录 下一题>
热门 试题

填空题
有以下说明定义和语句,可用a.day引用结构体成员day,写出引用结构体成员day的其他两种形式 【16】 、 【17】 。 struct int day;char mouth;int year;a,*b;b=&a;
填空题
以下程序实现带有头结点的单链表的建立,链表中每个结点包含数据域data(字符型)和指针域next,所建立链表的头指针由参数phd传回调用程序。在空格处填入正确内容。 # include<stdio.h> # include<stdlib, h> struct node char data; struct node * next; ; void creatlist( 【18】 ) char ch; struct node * s, * r; * phd= malloc( sizeof (struct node)); r= * phd; ch=getchar(); while(ch !=’@’) s = malloc(sizeof(struct node)); s->data=ch; r->next=s; r=s; ch= getchar(); ; r->next= 【19】 ; main ( ) struct node * head; head= NULL; creatlist( 【20】 )
相关试题
  • 以下程序的输出结果是 ( ) main() ...
  • 设下面程序段中调用fun函数传送实参a和b,...
  • 有以下程序 main() int a[3][3]...
  • 有以下程序 main() int aa[4][4...
  • 有以下程序: int x=1,y=2; void...