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

题目内容 (请给出正确答案)

若有如下程序: void sub() { int a,b; a=lO;b=20; printf("%d,%d\n",b,a);} main() { int a=1O,b=20; sub(); printf("%d,%d\n"'a'b); } 则程序运行后的输出结果是( )。

A.10,20

B.20,10 20,10

C.20,10

D.10,20 10,20 20,10


参考答案

更多 “ 若有如下程序: void sub() { int a,b; a=lO;b=20; printf("%d,%d\n",b,a);} main() { int a=1O,b=20; sub(); printf("%d,%d\n"'a'b); } 则程序运行后的输出结果是( )。A.10,20B.20,10 20,10C.20,10D.10,20 10,20 20,10 ” 相关考题
考题 有以下程序#include stdio.h#include stdlib.hint fun(int n){ int *p;p=(int*)malloc(sizeof(int));*p=n; return *p;}main(){ int a;a = fun(10); printf("%d\n",a+fun(10));}程序的运行结果是A)0B)10C)20D) 出错

考题 若有定义和语句: int**pp,*p, a=20,b=1O; pp=p; p=a; p=b; printf ("%d,%d\n",*p,**pp); 则输出结果是( )。A.20,10B.20,20C.10,20D.10,10

考题 有以下程序#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

考题 以下程序的输出结果是includevoid prt(int *x,int*y,int*z){ printf("%d,%d,%d\n",++* 以下程序的输出结果是 #include<stdio.h> void prt(int *x,int*y,int*z) { printf("%d,%d,%d\n",++*x,++*y,*(z++));} main() { int a=10,b=40,c=20; prt(a,b,c); prt(a,b,c);}A.11,42,31 12,22,41B.11,41,20 12,42,20C.11,21,40 11,21,21D.11,41,21. 12,42,22

考题 以下程序的输出结果是()。includevoid prt(int*x,int*y,int*z){printf("%d,%d,%d\n",++ 以下程序的输出结果是( )。 #include<stdio.h> void prt(int *x,int *y,int *z) { printf("%d,%d,%d\n",++ *x,++ *y,*(z++));} main() { int a=10,b=40,c=20; prt(a,b,c); prt(a,b,c); }A.11,42,31 12,22,41B.11,41,20 12,42,20C.11,21,40 11,21,21D.11,41,21 12,42,22

考题 若有以下程序includeint a[]={2,4,6,8};main(){int i; int *p=a; for(i=0;i 若有以下程序 #include <stdio.h> int a[]={2,4,6,8}; main() { int i; int *p=a; for(i=0;i<4;i++)a[i]=*p; printf("%d\n",a[2]);} 上面程序输出结果是A.6B.8C.4D.2

考题 以下程序的输出结果是()。includevoid prt(int *x,int *y,int *z){printf("%d,%d,%d\n" 以下程序的输出结果是( )。 #include<stdio.h> void prt(int *x,int *y,int *z) {printf("%d,%d,%d\n",++*x,++*y,*(z++));} main() {inta=10,b=40,c=20; prt(a,b,C); prt(a,b,C);}A.11,42,31 12,22,41B.11,41,20 1,42,20C.11,21,40 11,21,21D.11,41,21 12,42,22

考题 下列程序中,正确的为______。A.main() { int *pb=b; float 1>=15.25; print f("%d\n" ,*pb); }B.amin() { int a,*pa; a=10; *pa=a; prinffC%d",*pa); }C.main() { char s[20]; char *ps=s; scanf("%s",*p); printf("%s",*p); }D.main() { char str[10]; int *ps=str[0]; str="abcdefg"; printf("%s",*p); }

考题 若有如下程序: int s[3] [3]={'a','b','C','d','e','f','g','h','i'},*t; main() {t:(int*)malloc(sizeof(int)); sub(t,s); printf("%c\n",*t); } sub(int*p,int b[][3]) {*p=b[2][1]; } 则程序运行后的输出结果是( )。A.dB.eC.hD.b