3、阅读下列程序,则在执行后,程序的运行结果为()  #include <string.h> #include<stdio.h> int main() { char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"); printf("%s\n",a); }A.nice to meet you youB.nice toC.meet you youD.nice to you

3、阅读下列程序,则在执行后,程序的运行结果为()  #include <string.h> #include<stdio.h> int main() { char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"); printf("%s\n",a); }

A.nice to meet you you

B.nice to

C.meet you you

D.nice to you


参考答案和解析
D 在C中,数据只能从实际参数单向传递给形参。

相关考题:

阅读下面程序,则程序的执行结果为 【10】 。#include "stdio.h"main(){ int a=10;fun(a);printf( "%d\n",a);}fun(int x){ x=50;}

下面程序的输出结果是includeincludemain(){char *pl="abc",*p2="ABC",str 下面程序的输出结果是 #include<stdio.h> #include<string.h> main() { char *pl="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s\n",str);}A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC

下列程序执行的输出结果是()。inClUdemain(){char a[2][4]; strcpy(a,"are");strcpy(a[ 下列程序执行的输出结果是( )。 #inClUde<stdio.h> main() { char a[2][4]; strcpy(a,"are");strcpy(a[1],"you"); a[0][3]=''; printf("%s\n",a); }A.areyouB.youC.areD.

有下列程序: include include "string.h" void tim(char *s[],int n) 有下列程序: #include <stdio.h> #include "string.h" void tim(char *s[],int n) { char *t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) {t=s[i];s[i]=s[j];s[j]=t;} } main() { char *ss[]= {"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5);printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

阅读下列程序,则在执行后,程序的运行结果为#include "stdio.h"#include "string.h"main(){ char a[30]="nice to meet you!";strcpy(a+strlen(a)/2,"you");printf("%s\n",a);}A.nice to meet you youB.nice toC.meet you youD.nice to you

阅读下面程序,则程序的执行结果为( )。 include"stdio.h" main() {int a=10; fun(A); printf("%d\n",A);} fun(int x) {x=50;}

下列程序的运行结果是()。includeincludemain(){ char*s1="ahDuj";char*s2= 下列程序的运行结果是( )。#include<stdio.h>#include<string.h>main(){ char*s1="ahDuj"; char*s2="ABdUG": int t; t=strcmp(s1,s2); printf("%d", t);}A.正数B.负数C.零D.不确定的值

以下程序的输出结果是【】。 include include void main 0 { char s[50]; st 以下程序的输出结果是【 】。include<iostream.h>include <string.h>void main 0 {char s[50];strcpy(s[O], "No" );strcpy(s[1], "123" );strcpy (s[2], "23456" );cout<<s;}

下列程序执行的输出结果是()。 include main() {char a[2][4];strcpy(a,"are");strcpy( 下列程序执行的输出结果是( )。 #include<stdio.h> main() { char a[2][4]; strcpy(a,"are");strcpy(a [1],"you"); a[0][3]=''; printf("%s\n",a); }A.areyouB.youC.areD.

下列程序的运行结果是()。 include include main() {char*s1="abDuj"; char 下列程序的运行结果是( )。#include<stdio.h>#include<string.h>main(){ char*s1="abDuj";char*s2="ABdUG";int t;t=strcmp(s1,s2) ;printf("%d",t);}A.正数B.负数C.零D.不确定的值

下列程序的运行结果为【】。 include include {int a; char b[10]; double c;}; 下列程序的运行结果为【 】。include<stdio.h>include<string.h>{ int a; char b[10]; double c; };void f (struct A *t);main(){ struct A a={1001,"ZhangDa",1098.0};f(a) ; printf("%d,%s,%6.lf\n",a.a,a.b,a.C);}void f(struct A*t){ strcpy(t->b, "ChangRong");}

有以下程序:include include main( ) {char a[ 7 ] = "a0 \0a0 \0";int i, 有以下程序:#include <stdio.h>#include <string.h>main( ) { char a[ 7 ] = "a0 \0a0 \0"; int i,j; i = sizeof(a); j = strlen(a); printf(" % d %d \n" ,i,j); }程序运行后的输出结果是( )。A.22B.76C.72D.62

有如下程序段#include "stdio.h"#include "string.h"#define N 10#define M 10char *find(char(*a)[M],int n){ char *q;int i; q=a[0]; for(i=0;in;i++) if(strcmp(a[i],q)0)q=a[i]; return q;}main(){ char s[N][M]={"tomeetme","you","and","he","china"}; char *p; int n=5; p=find(s,n); puts(p);}则执行后输出的结果为A.he B.and C.you D.tomeetme

设有下列程序: include include main() { int i; char si 10],ti 10]; gets( 设有下列程序:include<stdio.h>include<string.h>main(){ int i;char si 10],ti 10];gets(t);for(i=0;i<2;i++){ gets(s);if(strcmp(t,s)<0)strcpy(t,s);}printf("%s\n",t);}程序运行后,从键盘上输入(<CR>代表回车符):CDEF<CR>BADEF<CR>QTHRG<CR>,则程序的输出结果是______。

以下程序运行后的输出结果是( )。 include main() {char ch[]="abcd",x[4][4];int i; f 以下程序运行后的输出结果是( )。 include<string.h> main() {char ch[]="abcd",x[4][4];int i; for(i=0;i<4;i++)strcpy(x[i],ch); for(i=0;i<4;i++)printf("%s",x[i][i]); printf("\n"); }

下面程序的运行结果是()。includeincludemain(){char*s1="abDuj";char*s2=" 下面程序的运行结果是( )。 #include<stdio.h> #include<string.h> main() {char*s1="abDuj"; char*s2="ABdUG"; int t; t=strcmp(s1,s2); printf("%d",t); }A.正数B.负数C.零D.不确定的值

以下程序:includeincludemain(){char str[]="abcd\n\123\xab";printf("%d" 以下程序: #include<stdio.h> #include<string.h> main() {char str[]="abcd\n\123\xab"; printf("%d",(str)); } 运行后的输出结果是( )。A.10B.9C.7D.14

以下程序:includemain(){char str[10];scanf("%s",str);printf("%s\n",str);}运 以下程序: #include<stdio.h> main() {char str[10]; scanf("%s",str); printf("%s\n",str); } 运行上面的程序,输入字符串how are you,则程序的执行结果是( )。A.howB.how are youC.hD.howareyou

有以下程序: include include using namespace std; int main() {char arr[ 有以下程序: #include<iostream> #include<string> using namespace std; int main() { char arr[2][4]; strcpy(arr[0],"you"); strcpy(arr[1],"me"); arr[0][3]=''; cout<<arr[0]<<end1; return 0; } 执行后的输出结果是( )。A.youmeB.youC.meD.err

下面程序的运行结果是 ( ) include include main( ) { char * a=" 下面程序的运行结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char * a="AbcdEf",* b="aBcD" a + +;b + +; printf("%d\n",strcmp(a,b)); }A.0B.负数C.正数D.无确定值

下列程序的输出结果是()。 include include main() {char a[]="\n123\\";pr 下列程序的输出结果是( )。 #include<stdio.h> #include<string.h> main() { char a[]="\n123\\"; printf ("%d,%d\n",strlen(a),sizeof(a)); }A.5,6B.5,5C.6,6D.6,5

有以下程序: include include void f(char * s,char*t){char k; k=*s;*s=* 有以下程序: #include <stdio.h>#include <string.h>void f(char * s,char*t){ char k; k=*s; *s=*t; *t=k; s++; t--; if( * s) f(s,t);}main( ){ char str[10] :"abedefg", * p; p = str + strlen(str)/2+1; f(p,p -2); printf( "% s \n" ,str);程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg

下面程序的输出结果是 ( ) include include { char * p1="abc" , * 下面程序的输出结果是 ( ) # include<stdio.h> # include<string.h> { char * p1="abc" , * p2=" ABC ",str[50]="xyz"; strcpy(str+2.strcat (pi,p2)); printf("%s\n",str);}A.xyzabcABB.zabcABCC.yzabcABCD.xycbcABC

以下程序 include include main() { char*p1="abc",*p2="ABC",str[50]="xy 以下程序 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz"; strcpy(ar+2,strcat(p1,p2)); printf("%s\n",str); } 的输出是______。A.xyzabcABCB.zabeABCC.yzabcABCD.xyabcABC

有以下程序: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 include fun(char*w,int n) { char 下面程序的运行结果是______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) {t=*s1++;*s1=*s2--;*s2=t;} } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.7654321B.1714171C.1711717D.7177171

下列程序执行后的输出结果是()。includeincludemain(){char arr[2][4]; str 下列程序执行后的输出结果是( )。 #include<stdio.h> #include <string.h> main() { char arr[2][4]; strcpy(arr[0],"you");strcpy(arr[1],"me"); arr[0][3]=''; Printf("%s\n",arr); }A.youmeB.youC.meD.err

下列程序执行后的输出结果是 include main() { char arr[2][4]; strcpy( 下列程序执行后的输出结果是 #include<string.h> main() { char arr[2][4]; strcpy(arr, "you"); strcpy(arr[1], "me"); arr[0][3]=''; cout<<arr<<endl; }A.youmeB.youC.meD.err