填空题

下列程序的功能是将字符串s中所有的字符C删除。请填空。
#include<stdio.h>
main()
char s[80];
int i,j;
gets(s);
for(i=j=0;s[i]!="\0";i++)
if([i]!=’C’)______;
s[j]=’\0’;
puts(s);

【参考答案】

s[j++]=s[i]。
<上一题 目录 下一题>
热门 试题

填空题
以下程序运行后的输出结果是______。 main() int a[4][4]=1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18; int i=0,j=0,s=0, while(i++<4) if(i==2 || i==4) continue ; J=0; do(s+=a[i][j]; j++; )while (j<4); printf( %d n ,s);
填空题
以下程序中函数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->next; while______ printf( %s n ,p->sub); p=p->next; main() Node*hd; hd=fun(); disp(hd); printf( n );
相关试题
  • 以下叙述中正确的是( )。
  • 下列有关数据库的描述,正确的是( )。
  • 数据的存储结构是指( )。
  • 软件按功能可以分为:应用软件、系统软件和...
  • 若进栈序列为1,2,3,4,进栈过程中可...