网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
有以下程序: #include  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("%c,%c",b,a); } 程序运行后的输出结果是。
A

b,B,b,A

B

b,B,B,A

C

a,B,B,a

D

a,B,a,B


参考答案

参考解析
解析:
fun()函数中的两个局部变量c和d,c是一个字符指针变量,在程序中取出指针所指内存单元的值进行修改,对其进行的修改影响调用函数中对应的变量的值;而d是一个整型变量,在程序中进行的修改是局部的,不影响其他函数。答案选择A选项。
更多 “单选题有以下程序: #include voidfun(char*c,intd) {  *c=*c+1;  d=d+1;  printf("%c,%c,",*c,d); } main() {  charb='a',a='A';  fun(b,a);  printf("%c,%c",b,a); } 程序运行后的输出结果是。A b,B,b,AB b,B,B,AC a,B,B,aD a,B,a,B” 相关考题
考题 有以下程序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

考题 ( 26 )有以下程序#include stdio.hvoid 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 , B , AC ) a , B , B , aD ) a , B , a , B

考题 有以下程序#include stdio.hint a= 5;void fun(int b){ int a= 10;a+=b; printf("%d",a);}main(){ int c=20;fun(c);a+=c;printf("%d\n",a);}程序运行后的输出结果是 【 1 1 】 。

考题 有以下程序:includevoid fun(char *c,intD){*c=*c+1;d+=1;printf("%c,%c",*c,D;}main( 有以下程序: #include<stdio.h> void fun(char *c,intD){ *c=*c+1; d+=1; printf("%c,%c",*c,D;} main() { char a='F',b='f'; fun(b,A); printf("%c,%c\n",a,B);} 程序的输出结果为( )。A.g,GF,gB.g,FF,gC.G,fF,GD.f,gf,g

考题 有以下程序: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 main( ) { printf("%d\n",NULL); } 程序运行后的输出结果是 有以下程序#include <stdio.h>main( ){ printf("%d\n",NULL); }程序运行后的输出结果是A.0B.1C.-1D.NULL没定义,出错

考题 有以下程序:include main(){ printf("%d\n",NULL);}程序运行后的输出结果是()。A.0B.1C 有以下程序: #include<stdio.h> main() { printf("%d\n",NULL);} 程序运行后的输出结果是( )。A.0B.1C.-1D.NULL没定义,出错

考题 有以下程序 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 main ( ){char a :'a',b; printf( "% c," , + + a); printf("%c 有以下程序: #include <stdio. h> main ( ) { char a :'a',b; printf( "% c," , + + a); printf("%c \n" ,b =a++); }程序运行后的输出结果是( )。A.b,bB.b,cC.a,bD.a,c

考题 有以下程序: include main( ) {char s[ ] ="159" , * p;p=s;printf( "% c", * p + + 有以下程序: #include <stdio.h> main( ) { char s[ ] ="159" , * p; p=s; printf( "% c", * p + + ); printf("%~", * p++);}程序运行后的输出结果是( )。A.15B.16C.12D.59

考题 有以下程序段 main() { char a[7]="abcdef"; charb[4]="ABC"; strcpy(a,b) ; printf("%c",a[5]); } 程序段运行后的输出结果是( )A.aB.\0C.eD.f

考题 有以下程序 void fun(char *c,int d) { *c=*c+1;d=d+1; printf(“%c,%c”,*c,d); } main() { char a='A',b='a'; fun(b,a);printf(“%c,%c\n”,a,b); } 程序运行后的输出结果是A.B,a,B,aB.a,B,a,BC.A,b,A,bD.b,B,A,b

考题 有以下程序 include main() { char a=4; printf("%d/n,a=a 有以下程序 #include <stdio.h> main() { char a=4; printf("%d/n,a=a<<1); } 程序的运行结果是______。A.40B.16C.8D.4

考题 有以下程序#include stdio.hvoid fun( char. c){ if(c'x') fun( c-1);printf("%c",c);}main( ){ fun(’z’); }程序运行后的输出结果是A) xyzB) wxyzC) zyxwD)zyx

考题 有以下程序#include atdio.hVoid 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(“%c,%c\n”,B,a);}程序运行后的输出结果是A.B,B,B,AB.B,B,B,AC.a,B,B,aD.a,B,a,B

考题 有以下程序:include main( ){char P[] = {'a','b','c'} ,q[]: "abc";printf( "% d % d 有以下程序:#include <stdio.h>main( ){ char P[] = {'a','b','c'} ,q[]: "abc"; printf( "% d % d \ n", sizeof(p), sizeof(q) );}程序运行后的输出结果是( )。A.44B.33C.34D.43

考题 有以下程序include.main(){char*p="abcde\ofghjik\0";printf("%d\n",strlen(p));} 程 有以下程序 #include.<string.h> main() { char *p="abcde\ofghjik\0"; printf("%d\n",strlen(p)); } 程序运行后的输出结果是A.12B.15C.6D.5

考题 有以下程序: #includestdio.h main( ) { char a=H; a=(a=Aa=2)?(a-A+a):a; printf("%c\n",a); } 程序运行后的输出结果是( )。A.AB.aC.HD.h

考题 有以下程序:includestdio.hvoid 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

考题 有以下程序: void fun(char *c,int d) { *c= *c+1;d+=1; printf("%c,%c,",*c,d); } main( ) { char a='A',b='a'; fun(&b,a);printf("%c,%c\n",a,b); } 程序运行后的输出结果是A.B,a,B,aB.a,B,a,BC.A,b,A,bD.b,B,A,b

考题 (25)有以下程序(说明:字母A的ASCII码值是65)#include stdio.hvoid fun(char *s){ while(*s){ if(*s%2) printf("%c",*s);s++;}}main(){ char a[]="BYTE";fun(a); printf("\n");}程序运行后的输出结果是A)BYB)BTC)YTD) YE

考题 单选题有以下程序#include void fun(char **p){ ++p; printf(%s,*p);}main(){ char *a[] = {Morning, Afternoon, Evening, Night}; fun(a);}程序的运行结果是(  )。A AfternoonB flemoonC MorningD oming

考题 单选题有以下程序: #include voidfun(intp) {  intd=2;  p=d++;  printf(%d,p); } main() {  inta=1;  fun(a);  printf(%d,a); } 程序运行后的输出结果是(  )。A 32B 12C 21D 22

考题 单选题有以下程序:#include void fun(int n){ static int num = 1; num=num+n; printf(%d, num);}main(){ fun(3); fun(4); printf();}程序运行后的输出结果是(  )。A 48B 34C 35D 45

考题 单选题有以下程序(说明:字母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

考题 单选题有以下程序 #include voidfun2(chara,charb) {  printf(%c%c,a,b); } chara='A',b='B'; voidfun1() {  a='C';  b='D'; } main() {  fun1();  printf(%c%c,a,b);  fun2('E','F'); } 程序的运行结果是(  )A C D E FB A B E FC A B C DD C D A B

考题 单选题有以下程序: #include voidfun(int*p) {  printf("%d",p[5]); } main() {  inta[10]={1,2,3,4,5,6,7,8,9,10};  fun(a[3]); } 程序运行后的输出结果是(  )。A 5B 6C 8D 9

考题 单选题有以下程序: #include voidfun(char*c,intd) {  *c=*c+1;  d=d+1;  printf("%c,%c,",*c,d); } main() {  charb='a',a='A';  fun(b,a);  printf("%c,%c",b,a); } 程序运行后的输出结果是。A b,B,b,AB b,B,B,AC a,B,B,aD a,B,a,B