填空题

当运行以下程序时,输入abcd,程序的输出结果是 【19】 。
insert(char str[ ] )
int i;
i = stolen(str);
while (i>0)
str[2*i] =str[i]; str[2 * i-1] = ’* ’; i--;
printf( "% s \n", sir);main( )
char str[40];
seanf( "% s" ,str); insert(str);

【参考答案】

a*b*c*d*
<上一题 目录 下一题>
热门 试题

填空题
以下程序中函数fun()的功能是构成一个如图所示的带头结点的单向链表,在结点的数据域中放入了具有两个字符的字符串。函数disp的功能是显示输出该单向链表中所有结点中的字符串。请填空完成函数disp。 #include <atdio.h>typedef struct node *链表结点结构* char sub[3]; struct node * next; NodeNode ~un(char s) *建立链表* ......void disp(Node * h) Node * Ps p=h->next; while( 【17】 ) printf( %s n ,p->suh);p= 【18】 ;main( ) Node * hd; hd = fun( ); disp(hd) ;prinff( n );
填空题
有两个C程序文件T18.c和myfun.c同在VC系统目录(文件夹)下,其中T18.c文件如下: #include <stdio.h> #include myfun.c main( ) fun(); prinff( n ); myfun.c文件如下: void fun( ) char s[80],c;int n=0; while((c=getchar())! :’ n’) s[n++] =c; n--; while ( n>=0) prinff( %c , s [n--] ); 当编译连接通过后,运行程序T18时,输入 Thank!”,则输出结果是 【13】 。
相关试题
  • 以下程序用于判断a,b,c能否构成三角形,...