网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下程序:
void fun2(char a,char b) {printf(”%c%c”,a,b); }
char a='A',b='B';
void funl( ){a='C';b='D';}
main( )
{ funl( );
printf("%c%c",a,b);
fun2('E','F');
}
程序的运行结果是( )。
A.CDEF
B.ABEF
C.ABCD
D.CDAB
参考答案
更多 “ 有以下程序:void fun2(char a,char b) {printf(”%c%c”,a,b); }char a=A,b=B;void funl( ){a=C;b=D;}main( ){ funl( );printf(%c%c,a,b);fun2(E,F);}程序的运行结果是( )。A.CDEFB.ABEFC.ABCDD.CDAB ” 相关考题
考题
有以下程序void fun2(char a,char b) {printf("%c%c",a,b);}char a='A',b='B';void fun1(){ a='C' ; b='D'; }main(){ fun1( );printf("%c%c",a,b);fun2('E','F');}程序的运行结果是A)CDEFB)ABEFC)ABCDD)CDAB
考题
有以下程序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
考题
有以下程序: void fun1(char*p) {char*q; q=P; while(*q!='\0') { (*q)++;q++;} } main() {char a[]={"Program"),*p; p=&a[3];funl(p);printf("%s\n",A); } 程序执行后的输出结果是( )。A.ProhsbnB.PrphsbnC.ProgsbnD.Program
考题
有以下程序 void fun2 (char a,char b) {printf("%c%c",a,b);} char a='A',b='B'; void fun1(){ a='C'; b='D'; } main() { fun1(); printf("%c%c",a,b); fun2 ('E','F'); } 程序的运行结果是______。A.CDEFB.ABEFC.ABCDD.CDAB
考题
有以下程序: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
考题
有以下程序:includeincludeincludevoid f(char*s,char*t){char k;k=*s; *
有以下程序: #include<stdio.h> #include<string.h> #include 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]="abcdefg",*P; P=str+strlen(str)/2+1: f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg
考题
有以下程序:includevoid f(char *s, char *t){ char k;k=*s;*s=*t; *t=k;s++;t- -;
有以下程序:#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]="abcdefg",*p; p=str+strlen(str)/2+ 1; f(p,p-2); printf("%s\n", str);}程序运行后的输出结果是( )。A.abcdcfgB.gfedcbaC.gbcdefaD.abedcfg
考题
阅读下面程序: 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;}则该程序的输出为【 】。
考题
有以下程序:void funl(char*p){ char*q;q=P;while(*q!=\O){(*q)++;q++;}}main{ char a[]={Program),*P;p=&a[3];funl(p);printf(%s\n,a);}程序执行后的输出结果是( )。A.ProhsbnB.PrphsbnC.ProgsbnD.Program
考题
有以下程序: 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 f(char *s,char *t) {char k; k=*s; +s=*t;
有以下程序: #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]="abcdefg",*p; p=str+strlen(str) /2+1; f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是 ______。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg
考题
有以下程序 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
考题
有以下程序 void ss(char *s,char t) { while { *s) if (*s==t) *s-t-'a' +'A'; S++; main () { char strl [100] =" abcddfefdbd" , c= 'd'; ss(str1,c); printf ("%s\n" ,str1); } 程序运行后的输出结果是A.ABCDDEFEDBDB.abcDDfefDbDC.abcAAfefAbAD.Abcddfefdbd
考题
有以下程序 void ss(char *s,char t) { while(*s) { if(*s==t)*s=t-'a'+'A'; s++; } } main() {char strl[100]=“abcddfefdbd”,c=‘d’; ss(strl,c);printf(“%s\n”,strl); } 程序运行后的输出结果是A.ABCDDEFEDBDB.abeDDfefDbDC.abcAMefAbAD.Abcddfefdbd
考题
阅读下面程序: 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;}则该程序的输出为______。
考题
void setmemory(char **p, int num){ *p=(char *) malloc(num);}void test(void){ char *str=NULL;getmemory(str,100);strcpy(str,"hello");printf(str);}运行test函数有什么结果?( )
考题
有以下程序: void fun2(char a,char b) {printf(”%c%c”,a,b); } char a=A,b=B; void funl( ){a=C;b=D;} main( ) { funl( ); printf("%c%c",a,b); fun2(E,F); } 程序的运行结果是( )。A.CDEFB.ABEFC.ABCDD.CDAB
考题
有以下程序 #includestdio.h void fun(char**p) {++p;printf("%s",*p);} main {char*a[]={"Morning","Afternoon","Evening"," Night"); fun(a); } 程序的运行结果是( )。A.AfternoonB.fternoonC.MorningD.orning
考题
有以下程序 void ss(char*s,char t) { while(*s) { if(*s==t)*s=t-'a'+'A'; s++; }} main() { char strl[100]="abcddfefdbd",c='d'; ss(str1,c);printf("%s\n",strl);} 程序运行后的输出结果是A.ABCDDEFEDBDB.abcDDfefDbDC.abcAAfefAbAD.Abcddfefdbd
考题
下列程序输出的结果是()。includeun1(char a,char b){char c;c=a;a=b;b=c;}fun2(char*a
下列程序输出的结果是( )。 #include<stdio.h> un1(char a,char b){char c;c=a;a=b;b=c;} fun2(char*a,char b){char c;c=*a;*a=b;b=c;} fun3(char*2,char*b){charc;c=*a;*a=*b;*b=c;} void main() { char a,b; a='A';b='B';funl(a,b);putchar(a);putchar(b);A.BABBABB.ABBBBAC.ABBABAD.ABABBA
考题
下面的程序各自独立,请问执行下面的四个TestMemory 函数各有什么样的结果?①void GetMemory(char * p){p = (char * )malloc(100);}void TestMemory (void){char *str = NULL;GetMemory (str);strcpy(str, "hello world");prinff(str);}② char * GetMemory (void){char p[ ] = "hello world";return p;}void TestMemory (void){char * str = NULL;str = GetMemory( );printf(str);}③void GetMemory(char * * p, int num){* p = (char * )malloc(num);}void TestMemory (void){char * str = NULL;GetMemory(str, 100);strcpy( str, "hello" );printf(sir);}④void TestMemory (void){char *str = (char * )malloe(100);strepy (str, "hello" );free ( str );if(str ! = NULL){strepy( str, "world" );printf(str);}}
考题
下列程序输出的结果是()。includefun1(char a,char b){char c;c=a;a=b;b=c;}fun2(char*
下列程序输出的结果是( )。 #include<stdio.h> fun1(char a,char b){char c;c=a;a=b;b=c;} fun2(char*a,char b){char c;c=*a;*a=b;b=c;} fun3(char*a,char*b){char c;c=*a;*a=*b;*b=c;} void main() { char a,b; a='A';b='B';fun1(a,b);putchar(a);putchar(b); a='A';b='B';fun2(a,b);putchar(a);putchar(b); a='A';b='B';fun3(a,b);putchar(a);putchar(b); putchar('\n'); } A) B)C) D)A.BABBABB.ABBBBAC.ABBABAD.ABABBA
考题
有以下程序 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
考题
有以下程序: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
考题
有以下程序:includevoid fun(char *a, char *b){ a=b;(*a)++;}main(){char c1='A',c2=
有以下程序: #include <stdio.h> void fun(char *a, char *b) { a=b; (*a)++;} main() { char c1='A',c2='a',*p1,*p2; p1=c1; P2=c2; fun(p1,p2); printf("%c%c\n",c1,c2); } 程序运行后的输出结果是( )。A.AbB.aaC.AaD.Bb
考题
下列程序输出的结果是( )。 include fun1(char a,char b) {char c;c=a;a=b;b=c;} fun2
下列程序输出的结果是( )。 #include<stdio.h> fun1(char a,char b) {char c;c=a;a=b;b=c;} fun2 (char*a,char b) {char c;c=*a;*a=b;b=c;} fun3(char*a,char*b) {char c;c=*a;*a=*b;*b=c;} void main() { char a,b; a='A';b='B'; fun1 (a,b);putchar(a);putchar(b); a='A';b='B'; fun2 (a,b);putchar(a);putchar(b); a='A';b='B'; fun3 (a,b);putchar(a);putchar(b); putchar('\n'); }A.BABBABB.ABBBBAC.ABBABAD.ABABBA
考题
单选题有以下程序#include void fun(char **p){ ++p; printf(%s,*p);}main(){ char *a[] = {Morning, Afternoon, Evening, Night}; fun(a);}程序的运行结果是( )。A
AfternoonB
flemoonC
MorningD
oming
考题
单选题有以下程序(说明:字母A的ASCII码值是65):#include void fun(char *s){ while(*s) { if(*s%2)printf(%c,*s); s++; }}main(){ char a[]=BYTE; fun(a); printf();}程序运行后的输出结果是( )。A
BYB
BTC
YTD
YE
热门标签
最新试卷