下面不能正确进行字符串赋值操作的是()。
A. char s[6]={“ABCDE”};
B. char s[5]={‘A’,'B’,'C’,'D’,'E’};
C. char *s;s=”ABCDE”;
D. char *s; scanf(“%s”,s);
下面程序的运行结果是______________。#include "stdio.h"main() {static char a[]="Language", b[]="programe";char *p1,*p2;int k;p1=a;p2=b;for(k=0;k<=7;k++)if(*(p1+k)==*(p2+k))printf("%c",*(p1+k));}
A. gae
B. ga
C. Language
D. 有语法错
下面程序的运行结果是___________。#include "stdio.h"#include "string.h"main() {char *p,str[50]="abc";p="abc";strcpy(str+1,p);printf("%s\n",str);}
A. aabc
B. abcabc
C. aabbcc
D. abc