#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*b
B.) a*b
C.) a*b****
D.) ab
[单选题]有以下程序#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. ) orning
[单选题]有以下程序#include <stdio.h>void fun(char **p){ p=p+2; printf("%s/n",*p);}main(){ char *a[]={"Morning","Afternoon","Evening","Night"}; fun(a);}程序的运行结果是A.rningB.afternoonC.ternoon D.Evening
[单选题](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);
[单选题]有以下程序:include<stdio.h>void fun(char*C,int d){*c=*c+1,d=d+1;printf(%"c%,c",*c,d);}main( ){char b=aa=A;fun(&b,a);printf(%"c,%c/n",b,a);)程序运行后的输出结果是( )。A.b,B,b,AB.b,B,B,AC.a,B,B,aD.a,B,a,B
[单选题]有以下程序#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 <stdio.h>void fun(char*fname,char*st){ FILE * myf; int i; myf=fopen(fname,"w"); for(i=0;i<strlen(st);i++)fputc(st[i],myf); fclose(myf);}main(){ fun("test.t","new world"); fun("test.t","hello,");}程序执行后,文件test.t中的内容是A.
[单选题]有以下程序#include <stdio.h>void fun( char. c){ if(c>'x') fun( c-1);printf("%c",c);}main( ){ fun(’z’); }程序运行后的输出结果是A.) xyzB.) wxyzC.) zyxwD.)zyx
[单选题]有以下程序#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 beijingB.Hello BeijingC.HELLO BEIJINGD.hELLO Beiji
[单选题]( 26 )有以下程序#include <stdio.h>void fun ( char *c , int d ){*c=*c+1 ; d=d+1 ;printf ( " %c , %c , ", *c , d ) ;main (){ char b= ‘ a ’ , a= ‘ A ’ ;fun ( &b , a ) ; printf ( " %e , %e \ n ", b , a ) ;}程序运行后的输出结果是A. ) b , B , b , AB. ) b , B
[单选题]有以下程序#include <stdio.h>void fun( int a, int b){ int t;t=a; a=b; b=t;}main(){ int c[10]={1,2,3,4,5,6,7,8,9,0},i;for(i=0;i<10;i+=2) fun(c[i], c[i+1]);for(i=0;i<10;i++) printf("%d," ,c[i]);printf("/n");}程序的运行结果是A.)1,2,3,4,5,6,7,8,9,0,B.)