(29)有以下程序include stdio.hvoid fun(char *c){ while(*c){ if(*c='a'stdio.hvoid fun(char *c){ while(*c){ if(*c='a'*c='z') *c=*c-('a'-'A');c++;}}main(){ char s[81];gets(s); fun(s); puts(s):}当执行程序时从键盘上输入Hello Beijing回车,则程序的输出结果是A)hello beijingB)Hello BeijingC)HELLO BEIJINGD)hELLO Beijing
(29)有以下程序include <stdio.h>void fun(char *c){ while(*c){ if(*c>='a'&&
(29)有以下程序
#include <stdio.h>
void fun(char *c)
{ while(*c)
{ if(*c>='a'&&*c<='z') *c=*c-('a'-'A');
c++;
}
}
main()
{ char s[81];
gets(s); fun(s); puts(s):
}
当执行程序时从键盘上输入Hello Beijing<回车>,则程序的输出结果是
A)hello beijing
B)Hello Beijing
C)HELLO BEIJING
D)hELLO Beijing
相关考题:
有以下程序#include stdio.hvoid fun(char *a,char *b){ while(*a=='*') a++;while(*b=*a) {b++;a++;}}main( ){ char *s="****a*b****",t[80];fun(s,t); puts(t);}程序的运行结果是A)*****a*bB) a*bC) a*b****D) ab
有以下程序void fun1(char *p){ char *q;q=p;while(*q!='\0'){ (*q)++; q++; ) }}main(){ char a[]={"Program"),*p;p=a[3];fun1(p);printf(" % s\n",a);}程序执行后的输出结果是A)ProhsbnB)PrphsbnC)ProgsbnD)Program
有以下程序:includevoid fun(char**p){++P;printf("%s\n",*p);}main()char*a[]={"Morn 有以下程序: #include<stdio.h> void fun(char**p) { ++P;printf("%s\n",*p);} main() char*a[]={"Morning","Afternoon","Evening","Night"}; fun(A); } 程序的运行结果是( )。A.AfternoonB.fternoonC.MorningD.oring
有以下程序: include using namespace std; constxntN=5; int fun(char*s,char a,int 有以下程序:include <iostream>using namespace std;const xnt N=5;int fun(char *s,char a,int n){int j;*s=a;j=n;while(a<s[j])j--;return j;}int main(){char s[N+1];int k;
阅读下面程序: include void funl(char a,char b) { char c; c=a;a=b;b=C; } void f 阅读下面程序:include<iostream.h>void funl(char a,char b){char c;c=a;a=b;b=C;}void fun2(char a,char b){char c;c=a;a=b;b=c;}void fun3(char a,char b){char c;c=a;a=b;b=C;}void main(){char a,b;a='A';b='B';funl(a,b);cout<<a<<b;a='A';b='B';fun2(a,b);cout<<a<<b;a='A';b='B';fun3(a,b);cout<<a<<b;}则该程序的输出为【 】。
有以下程序 include int fun(char s[]) { int n=O; whil 有以下程序 #include <stdio.h> int fun(char s[]) { int n=O; while(*s<='9'*s>='0') { n=10*n+*s-'0'; s++; } return (n); } main() { char s[10]={ '6', '1', '*', '4', '*', '9', '*', '0', '*'}; printf("%d\n",fun(s)); }A.9B.61490C.61D.5
有以下程序: include void funl (char * p){char * q; q=p; while( *q! ='\0') } (*q) 有以下程序: #include <stdio.h>void funl (char * p){ char * q; q=p; while( *q! ='\0') } (*q) ++;q++;}mains( ){ char a[ ] = { "Program" } , * p; p = a[3]; fun1 (p); printf("% s \n" ,a);}程序执行后的输出结果是( )。A.ProhsbnB.PrphsbnC.ProgsbnD.Program
有以下程序 include void fun(char **p) { ++p; printf("%s\n",*p); 有以下程序 #include <stdio.h> void fun(char **p) { ++p; printf("%s\n",*p); } main() { char *a[]={"Moming","Afternoon","Evening","Night"}; fun(a); } 程序的运行结果是A.AfternoonB.fternoonC.MorningD.orning
有以下程序 include void fun(char *t, char *s) { whil 有以下程序 #include <stdio.h> void fun(char *t, char *s) { while(*t!=0) t++; while( (*t++ = *s++ )!=0 ); main() { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss, aa); printff"%s,%s\n", ss,aa); 程序的运行结果是A.accxyy, bbxxyyB.acc, bbxxyyC.accxxyy, bbxxyyD.accbbxxyy, bbxxyy
有以下程序:includevoid fun(char *a,char*B){while(*a=='*')a++;while(*b=*A){b++;a+ 有以下程序: #include<stdio.h> void fun(char *a,char*B){while(*a=='*')a++; while(*b=*A){b++;a++;} } main() {char*s="****a*b****",t[80]; fun(s,t);puts(t); } 程序的运行结果是( )。A.*****a*bB.a*bC.a*b****D.ab
有以下程序inc1udevoid fun(char*s){while(*s) {if(*s%2=0) printf("%c",*s); s++ }}m 有以下程序 #inc1ude<stdio.h> void fun(char*s) { while(*s) { if(*s%2=0) printf("%c",*s); s++ } } main() { char a[]={"good"}; fun(A) ; prntf("n\"); } 注意:字母a的ASCII码值为97,程序运行后的输出结果是______。A.dB.goC.godD.good
下列程序的输出结果是【】。 include include using namespace std; void fun(c 下列程序的输出结果是【 】。include<iostream>include<cstring>using namespace std;void fun(const char *s,char c){c=s[strlen(s)/2];}int main(){char str[]="ABCDE";char ch=str[1];fun(str,ch);cout<<ch;return 0;}
有下列程序:includevoid fun(char *a, char *B){while(*a=='*')a++;while(*b=*A){b++; 有下列程序: #include <stdio.h> void fun(char *a, char *B) { while(*a=='*')a++; while(*b=*A) {b++;a++;} } main() { char *s="*****a*b****",t[80]; fun(s,t);puts(t); 程序的运行结果是( )。A.*****a*bB.a*bC.a*b****D.ab
阅读下面程序: include void fun1(char a,char b) { char c; c=a;a=b;b=c; } void f 阅读下面程序:include<iostream.h>void fun1(char a,char b){char c;c=a;a=b;b=c;}void fun2(chara,charb){char c;c=a;a=b;b=c;}void main(){char a,b;a='x';b='y';fun1(a,b);cout<<a<<b;a='x';b='y';fun2(a,b);cout<<a<<b;}则该程序的输出为______。
请读程序: includde include void fun(char * s) {char a[10]; str 请读程序: # includde<stdio.h> # include<string.> void fun(char * s) {char a[10]; strcpy(a,"STRING"); s=a; } main() { char*p; fun(p); print{("%s\n",p); } 上面程序的输出结果(表示空格) ( )A.STRINGB.STRINGC.STRINGD.不确定的值
以下程序的输出结果是()。includeint fun (char*s){char *p=s;while (*p!='\0,) p++ 以下程序的输出结果是( )。 #include<iostream.h> int fun (char*s) { char *p=s; while (*p!='\0,) p++: return (p-s): } void main() { cout<<fun (" ABCDEF ")<<endl: }A.3B.6C.8D.0
有以下程序 include int fun(char s[ ]) { int n=0; while(*s='0 有以下程序#include <stdio.h>int fun(char s[ ]){ int n=0;while(*s<='9'*s>='0') {n=10*n+*s-'0';s++;}retum(n);}main( ){ char s[10]={'6','1','*','4','*','9','*','0','*'};printf("%d\n",fun(s));}程序的运行结果是A.9B.61490C.61D.5
有以下程序 include void fun(char *t,char *s) { while(*t!=0) t++; while((*t++=*s 有以下程序#include <stdio.h>void fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main( ){ char ss[10]="acc",aa[10]="bbxxyy";fun(ss,aa); printf("%s,%s\n",ss,aa);}程序的运行结果是A.accxyy,bbxxyyB.acc,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy
有以下程序includevoid ss(char*s,char t){ while(*s){if(*S==t)*s=t-'a'+'A';s++; 有以下程序 #include<iostream.h> void ss(char*s,char t) { while(*s) { if(*S==t)*s=t-'a'+'A'; s++;} } void main( ) { char strl[100]="abcddfefdbd",c='d': ss(strl,c) ;cout<<strl;} 程序运行后的输出结果是A.ABCDDEfEBDB.abcDDfefDbDC.abcAAfefALbAD.Abcddfefdbd
有以下程序:include char fun(char x,char y){if(x 有以下程序: #include <stdio.h> char fun(char x,char y) { if(x<y) return x; return y; } main() { int a='9',b='8',c='7'; printf("%c\n",fun(fun(a,b),fun(b,c))); } 程序的执行结果是( )。A.函数调用出错B.8C.9D.7
有以下程序: include void fun(char(*p)[6]) { int i; for(i=0;i 有以下程序: #include void fun(char(*p)[6]) { int i; for(i=0;iA.Aa1FB.Ab3IC.ABCDD.fghij
有以下程序:includeint fun(char s[]){ intn=0;while(*s='0'){n=10 有以下程序: #include <stdio.h> int fun(char s[]) { int n=0; while(*s<='9'*s>='0') {n=10*n+*s-'0';s++;} return(n); } main() { char s[10]={'6','1','*','4','*','9','*','0','*'}; printf("%d\n",fun(s)); } 程序的运行结果是( )。A.9B.61490C.61D.5
单选题有以下程序#include void fun(char **p){ ++p; printf(%s,*p);}main(){ char *a[] = {Morning, Afternoon, Evening, Night}; fun(a);}程序的运行结果是( )。AAfternoonBflemoonCMorningDoming
单选题有以下程序#include void fun(char *t,char *s){ while(*t!=0)t++; while((*t++=*s++)!=0);}main(){ char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,aa); printf("%s,%s",ss,aa);}程序的运行结果是( )。Aaccbbxxyy,bbxxyyBacc,bbxxyyCaccxxyy,bbxxyyDaccxyy,bbxxyy
单选题有以下程序#include void fun(char *a, char *b){ while(*a=='*') a++; while(*b=*a) { b++; a++; }}main(){ char *s=*****a*b**** , t[80]; fun(s,t); puts(t);}程序的运行结果是( )。A*****a*bBa*bCa*b****Dab
单选题有以下程序#include void fun1(char *p){ char *q; q=p; while(*q!='\0') { (*q)++; q++; } }main(){ char a[]={Program},*p; p=a[3]; fun1(p); printf(%s,a); }程序执行后的输出结果是( )。AProhsbnBPrphsbnCProgsbnDProgram
单选题有以下程序(说明:字母A的ASCII码值是65):#include void fun(char *s){ while(*s) { if(*s%2)printf(%c,*s); s++; }}main(){ char a[]=BYTE; fun(a); printf();}程序运行后的输出结果是( )。ABYBBTCYTDYE