有以下程序: #include<stdlib.h> main( ) { char *p ,* q; p=(char * )malloc(sizeof(char) * 20);q=p; scanf("%s%s",p,q); printf("%s%s/n",p,q); } 若从键盘输入:abc def<回车>,则输出结果是
A.def def
B.abc def
C.abc d
D.d d
[单选题]有以下程序include main(){ char *p,*q;p=(char*)malloc(sizeof(char)*20);q=p;scanf有以下程序 #include <stdlib.h> main() { char *p,*q; p=(char*)malloc(sizeof(char)*20); q=p; scanf("%s %s",p,q); printf("%s %s/n",p,q); } 若从键盘输入:abc def<回车>, 则输出结果是A.def defB.abc
[单选题]有以下程序:include include main(){char *p[10]={"abc","aabdfg","dcdbe"有以下程序: #include <stdio.h> #include <string.h> main() { char *p[10]={"abc","aabdfg","dcdbe","abbd","cd"}; printf("%d/n",strlen(p[4])); } 执行后的输出结果是( )。A.2B.3C.4D.5
[单选题]有以下程序:include main( ) char * p[ ] = {"3697" ,"2548" }; int i,j;long num =0有以下程序: #include <stdio.h> main( ) char * p[ ] = {"3697" ,"2548" }; int i,j; long num =0; for(i =0;i<2;i ++ ) { j =0; while(p[i][j]! ='/0') { if((p[i][j]-'0')%2) nu
[单选题]有以下程序: include main( ) { char *p="abcde/0ghjik/0"; printf("%d/n",str有以下程序: #include<string.h> main( ) { char *p="abcde/0ghjik/0"; printf("%d/n",strlen(p) ); } 程序运行后的输出结果是A.12B.15C.6D.5
[单选题]有以下程序includeincludevoid main( ){char*p="abcde/0fghjik/0"; cou有以下程序 #include<string.h> #include<iostream.h> void main( ) { char*p="abcde/0fghjik/0"; cout<<strlen(p);} 程序运行后的输出结果是A.12B.15C.6D.5
[单选题]有以下程序: include include main( ) {char p[] = {'a','b','c'] ,q[10有以下程序: #include <stdio.h> #include <string.h> main( ) { char p[] = {'a','b','c'] ,q[10] = {'a','h','c'} prinff( "% d % d/n" , strlen (p) , strlen (q) );以下叙述中正确的是( )。A
[单选题]有以下程序: include main() {char p[]={'a','b','c'},q[10]={'a','b','有以下程序: #include <string.h> main() {char p[]={'a','b','c'},q[10]={'a','b','c'}; printf("%d%d/n",strlen(p),strlen(q)); } 以下叙述中正确的是 ______。A.在给p和q数组置初值时,系统会自动添加字符串结束
[单选题]有以下程序 include main() { char p[20]={'a','b','c','d'},q[]="abc",r[]有以下程序 #include<string.h> main() { char p[20]={'a','b','c','d'},q[]="abc",r[]="abcde"; strcat(p,r);strcpy(p+strlen(q),q); printf("%d/n",strlen(p)); } 程序运行后的输出结果是A
[单选题]有以下程序 include main() { char p[20]={'a','b','c','d'},q[]="abc",r[]有以下程序 #include<string.h> main() { char p[20]={'a','b','c','d'},q[]="abc",r[]="abcde"; strcpy(p+strlen(q),r);strcat(p,q); printf("%d%d/n",sizeof(p),strlen(p)); }
[单选题]有以下程序#includemain( ){ char p[20]={'a','b','c','d'},q[ ]="abc",r[ ]="abcde';strcat(p,r) ;strcpy(p+strlen(q),q);printf("%d/n",strlen(p));}程序运行后的输出结果是A.9B.6C.11D.7