A: One*Dream!World
B: One*World!W
C: One One
D: OO
举一反三
- 有以下程序,程序运行后的输出结果是( ) #include int main() { char str[ ][20]={"One*World", "One*Dream!"}; printf("%s",str[1]); printf("%s\n",str[0]+4); } A: One*Dream!World B: One*WorldOne*Dream C: One One D: OO
- 有以下程序,程序运行后的输出结果是_____ #include int main() { char str[ ][20]={"One*World", "One*Dream!"}; printf("%s",str[1]); printf("%c\n",str[0]+6); } A: One*Dream!World B: One*WorldOne*Dream C: One One D: One*Dream!r
- #include #include main() {char str[][20]={"One*World","One*Dream!"}; char *p=str[1]; printf(“%d,”,strlen(p)); printf("%s ",p); } 程序运行后的输出结果是
- 有以下程序#include <stdio.h>#include <string.h>main(){ char str[ ][20]={“One*World”, “One*Dream!”},*p=str[1];printf(“%d,”,strlen(p));printf(“%s ”,p);}程序运行后的输出结果是()
- 有以下程序#include#includemain(){charstr[][20]={“One*World”,“One*Dream!”},*p=str[1];printf(“%d,”,strlen(p));printf(“%s ”,p);}程序运行后的输出结果是
内容
- 0
以下程序 #include <string.h> main() {char str[][20]={"Hello","Beijing"},*p=str; printf("%d ",strlen(p+20)); } 程序运行后的输出结果是
- 1
当运行以下程序时,输入abcd,程序的输出结果是:【1】。#include #include insert(char str[]){int i; i=strlen(str); while(i>0) {str[2*i]=str[i];str[2*i-1]='*';i--;} printf("%s\n",str);}void main(){char str[40]; scanf("%s",str); insert(str);}[/i]
- 2
分析下程序,写出输出结果。 #include [stdio.h] #include [string.h] void main( ) { char str[]="123456"; int i,x; char t; x=strlen(str)-1; for (i=0;i<=x/2;i++) { t=str[i]; str[i]=str[x-i]; str[x-i]=t; } puts(str); }[/i][/i]
- 3
有以下程序 void main() {char str[][10]={"China","Beijing"},*p=str; printf("%s\n",p+10);} 程序运行后的输出结果是______。 A: China B: Beijing C: ng D: ing
- 4
下面程序的运行结果为____。void main(){ char *p,*q;char str[]="Hello,World\n";q=p=str; p++;printf("%s\n",q);printf("%s\n",p); }