有以下程序#include "stdio.h"void fun(int *a,int *b){ int c=20,d=20; *a=c/3; b=d/5;}main(){ int a=3,b=5; fun(a,b); printf("%d,%d\n",a,b);}程序的运行结果是A.6,5 B.5,6C.20,25 D.3,5

有以下程序#include "stdio.h"void fun(int *a,int *b){ int c=20,d=20; *a=c/3; b=d/5;}main(){ int a=3,b=5; fun(&a,&b); printf("%d,%d\n",a,b);}程序的运行结果是A.6,5 B.5,6C.20,25 D.3,5


相关考题:

阅读下面程序,则输出结果是#include "stdio.h"void fun(int *a,int *b){int c=20,d=25;*a=c/3;*b=d/5;}main(){ int a=3,b=5;fun(a,b);printf("%d,%d\n",a,b);}A.6,5B.5,6C.20,25D.3,5

以下程序段中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是______。A.main() { int *p; fun(p); …… } int fun(int *p) {int s; p=s;}B.main() { int *p; fun(p); …… } int fun(int **p) {int s; *p=s;}C.# include<stdlib. h> main() {int *p; fun(p); …… } int fun(int **p) {*p=(int *)malloc(2);}D.# include<stdlib. h> main() { int *p; fun(p); …… } int fun(int *p) {p=(int *)malloc(sizeof(int));}

有以下程序 include void fun(int*a,int*B) { int*c; c=a;a=b;b=c; } main() {int x=3 有以下程序 #include<stdio.h> void fun(int*a,int*B) { int*c; c=a;a=b;b=c; } main() { int x=3, y=5,*p=x, *q=y; fun(p,q); printf("%d,%d,",*p,*q); fun(x,y); printf(" %d,%d\n",*p,*q); } 程序运行后的输出结果是______。A.3,5,5,3B.3,5,3,5C.5,3,3,5D.5,3,5,3

有以下程序 include include int fun(int n) {int * 有以下程序 #include <stdio.h> #include <stdlib.h> int fun(int n) {int *p; p=(int*)malloc(sizeof(int)); *p=n; return *p; } { int a; a=fun(10); printf("%d\n",a+fun(10)); } 程序的运行结果是______。A.0B.10C.20D.出错

以下程序的输出结果是#include "stdio.h"int *fun(int *a,int *b){ int m; m=*a; m+=*b-3; return(m);}main(){ int x=21,y=35,*a=x,*b=y; int *k; k=fun(a,b); printf("%d\n",*k);}

有以下程序:includevoid fun(int* s,int* * d){* *d=*(s+2);}main(){ inta[]={1,2,3, 有以下程序: #include <stdlib.h> void fun(int * s,int * * d) { * *d=*(s+2); } main() { int a[]={1,2,3,4,5},*b; b=(int *)malloc(sizeof(int)); fun(a,B) ; printf("%d\n",*b+1); } 程序的输出结果是( )A.2B.3C.4D.5

以下程序的输出结果是()。includeint fan(int);main(){int w=5; fun(w);printf("\n");} 以下程序的输出结果是( )。 #include <stdio.h> int fan(int); main() { int w=5; fun(w); printf("\n"); } fun(int k) { if(k>0) fun(k-1); printf("%d",k); }A.5 4 3 2 1B.0 1 2 3 4 5C.1 2 3 4 5D.5 4 3 2 1 0

以下程序的输出结果是( )。 include void swap(int*a,int*B){int*t; t=a;a=b;b=c;} main 以下程序的输出结果是( )。 include<stdio.h> void swap(int*a,int*B){int*t; t=a;a=b;b=c;} main() {int i=3,j=5,*p=i,*q=j; swap(p,q);printf("%d %d\n",*p,*q); }

现有如下程序段#include "stdio.h"int *fun(int *a,int *b){int c;c=*a%*b;return c;}main(){int a=5,b=19,*c;c=fun(a,b);printf("%d\n",++*c);}则程序段执行后的结果为A.8B.7C.6D.5