笔果题库
计算机二级C语言程序设计
VIP题库
搜题找答案,就上笔果题库
若有定义语句:char s[10]="1234567\0\0";,则strlen(s)的值是______。
搜题找答案,就上笔果题库
下面程序#include#includemain(){ char *p1="abc",*p2="ABC",str[50]="xyz";strcpy(str+2,strcat(p1,p2));printf("%s\n",str);}的输出是______。
搜题找答案,就上笔果题库
若要求从键盘读入含有空格字符的字符串,应该使用函数______。
搜题找答案,就上笔果题库
若有以下程序 #include main() { int i, j=0; char a[]="How are you!", b[10]; for ( i=0; a[i]; i++ ) if (a[i] == '' '') b[j++]=a[i+1]; b[j]=''\0''; printf("%s\n",b); }则程序的输出结果是______。
搜题找答案,就上笔果题库
有以下程序#include main(){ char s[10]="verygood", *ps=s;ps+=4;ps="nice";puts(s);}程序的运行结果是______。
搜题找答案,就上笔果题库
不能把字符串:Hello!赋给数组b的语句是______。
搜题找答案,就上笔果题库
有以下程序#include char *a="GOODNEWYEAR";char b[ ]="goodnewyear";main(){ int i=0;printf("%c%s\n",*a,b+7);}执行后的输出结果是______。
搜题找答案,就上笔果题库
设有定义char str[] = "Hello";则语句 printf("%d %d", sizeof(str), strlen(str));的输出结果是______。
搜题找答案,就上笔果题库
以下程序的输出结果是______。main(){ char st[20]="hello\0\t\\";printf("%d%d\n",strlen(st),sizeof(st));}
搜题找答案,就上笔果题库
有如下程序#include #include main(){char a[] = "1234", *b = "ABC";printf("%d,%d,%d,%d\n", strlen(a), sizeof(a), strlen(b), sizeof(b));}程序运行后的输出结果是______。