下面程序的功能是将字符串s中所有的字符a删除。请填空。#include<stdio.h>void main(){char s[80];
下面程序的功能是将字符串s中所有的字符a删除。请填空。
#include<stdio.h>
void main()
{char s[80];
int i,j=0;
gets(s);
for(i=0;s[i]!='\0';i++)
if(s[i]!='a')______;
s[j]='\0';
puts(s);}
下面程序的功能是将字符串s中所有的字符a删除。请填空。
#include<stdio.h>
void main()
{char s[80];
int i,j=0;
gets(s);
for(i=0;s[i]!='\0';i++)
if(s[i]!='a')______;
s[j]='\0';
puts(s);}
第1题
下面程序是将字符串P中的所有字符复制到字符串b中,要求每复制三个字符后插入一个空格。
#include<stdio.h>
void cp(char *P,char *b)
{int i,k=0;
while(*p)
{i=0;
while(______)/*第一空*/
{b[k]=*p;
k++;p++;i++;
}
if(*p)
{______;/*第二空*/
}
}
______;/*第三空*/
}
main()
{char a[20],b[20];
gets(a);
cp(a,b);
puts(b);
print f("\n");
}
第2题
第3题
第4题
A.:1,$s/stu/Student/gc
B.:1,$s/stu/Student
C.:1,Ns/stu/Student
D.:0,$s/stu/Student/g
第6题
第8题
A.1
B.2
C.3
D.4
第9题
以下程序的功能是计算字符串的长度。请填空。
#include<stdio.h>
main()
{char str[100],*sp=str;
int nlen=0;
scanf("%s",str);
for(;*sp!='\0';sp++)______;
printf("%d",nlen);
}
第10题
下面程序的功能是统计字符串中“广的个数,请填空。 Sub COU() a$="Beijing University of Technology" Dim n AS Integer n=Len(a$) For i=1 To n b$=【 】 If【 】Then x=x+1 Next i Print "x=";x End Sub