单项选择题

下列能正确定义字符串的语句是( )。

A.char str[]='\64';
B.char str="kx43";
C.char str=";
D.char str[]="\0";
<上一题 目录 下一题>
热门 试题

单项选择题
对下述程序的判断中,正确的是( )。 #include<stdio.h> void main() char *P,s[256]; p=s; while(strcmp(s, the end )) printf( Input the string: ); gets(s); while(*P) putchar(*p++);
A.此程序循环接收字符串并输出,直到接收到字符串“the end”为止
B.此程序循环接收字符串,接收到字符串“the end”则输出,否则程序终止
C.此程序循环接收字符串并输出,直到接收字符串“the end”为止,但因为代码有错误,程序不能正常工作
D.此程序循环接收字符串并将其连接在一起,直到接收字符串“the end”为止,输出连接在一起的字符串
单项选择题
下面程序的输出结果是( )。 #include<stdio.h> #include<string.h> main() char p1[]= WHO ,p2[]= who ,str[50]= xyz ; strcpy(str+1,strcat(p1,p2)); printf( %s ,str);
A.xyzWHOwho
B.zWHOwho
C.zWHOwho
D.xWHOwho
相关试题
  • 若运行以下程序时,从键盘输入ADescriptor...
  • 有以下程序: #include<string.h> vo...
  • 执行以下程序段的输出结果是( )。 int...
  • 在一棵二叉树中,叶子结点共有30个,度为...
  • 以下程序的输出结果是( )。 #include...