以下程序的运行结果为______。 main() { int x,*p,**q; x=10;p=x;q=p; printf("%d\n",**q); }A.10B.9C.8D.11
以下程序的运行结果为______。 main() { int x,*p,**q; x=10;p=&x;q=&p; printf("%d\n",**q); }
A.10
B.9
C.8
D.11
相关考题:
(26)有以下程序#include stdio.hvoid 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,3 B)3,5,3,5 C)5,3,3,5 D)5,3,5,3
有以下程序 int *f(int *x,int *y) { if(*x<*y) return x; else return y; } main( ) { int a=7,b=8,*p,*q,*r; p=a; q=b; r=f(p,q); printf("%d,%d,%d\n",*p,*q,*r); } 执行后输出结果是A.7,8,8B.7,8,7C.8,7,7D.8,7,8
以下程序的输出结果是 【11】 。int fun(int x,int y,int *p,int *q){ *p=x*y;*q=x/y;}main(){int a,b,c,d;a=4;b=3;fun(a,b,c,d);printf("%d,%d\n",c,d);}
有以下程序:int *flint *x, int *y){ if(*x<*y) return x; else return y;}main(){ int a=7,b=8,*p,*q,*r; p=a; q=b; r=f(p, q); printf("%d, %d, %d\n",*p,*q,*r);}执行后输出结果是( )。A.7,8,8B.7,8,7C.8,7,7D.8,7,8
有以下程序: int*f(int*x,int*y) { if(*x<*y) return x; else return y; } main() { int a=7,b=8,*P,*q,*r; P=a; q=&b; r=f(p,q); print("% d,% d,% d\n",*P,*q,*r); } 执行后的输出结果是 ______。A.7,8,8B.7,8,7C.8,7,7D.8,7,8
有以下程序:main(){ int a=7,b=8, *p, *q, *r;p=a; q=b;r=p; p=q; q=r;printf("%d,%d,%d,%d\n", *p,*q,a,b);}程序运行后的输出结果是【 】。
有以下程序: int *f(int *x,int *y) {if(*x<*y)return x; else return y; } main() { int a=7,b=8,*p,*q,*r; p=a; q=b; r=f(p,q); printf("%d,%d,%d\n",*p,*q,*r); } 程序运行后输出结果是______。A.7,8,8B.7,8,7C.8,7,7D.8,7,8
有以下程序 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
有以下程序includevoid f(int *p,int *q);main(){ int m=1,n=2,*r=m;f(r, n 有以下程序 #include<stdio.h> void f(int *p,int *q); main() { int m=1,n=2,*r=m; f(r, n); printf("%d,%d",m,n); } void f(int*p,int*q) {p=p+1; *q=*q+1;) 程序运行后的输出结果是______。A.1,3B.2,3C.1,4D.1,2
有以下程序includestdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,stdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,n);printf(”%d\n”,*r);}int-f(int*P,int*q)(return(*p*q)?p:q;)程序运行后的输出结果是______。
有以下程序:include main( ) { int a=7,b=8,* p,*q, *r; p=a;q=b; r=p; p= 有以下程序:#include <stdio.h> main( ) { int a=7,b=8,* p,*q, *r; p=a;q=b; r=p; p=q;q=r; printf(" % d,% d,% d,% d \n", * p, * q.a,b);程序运行后的输出结果是( )。A.8,7,8,7B.7,8,7,8C.8,7,7,8D.7,8,8,7
有下列程序: #includestdi0.h voidfun(int*a,int*b) {int*C; c=a;a=b;b=C; } voidmain( ) {intx=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
int*f(int*x,int*y) { if(*x>*y) return x; else return y; } main() { int a=7,b=8,*p,*q,*r; p=a;q=b;r=f(p,q); printf("%d,%d,%d",*p,*q,*r); }执行后输出结果是______。A.7,8,8B.7,8,7C.8,7,7D.8,7,8
下面程序的运行结果是void swap(int *a,int *b){ int *t; t=a;a=b;b=t;}main(){ int x=3,y=5,*p=x,*q=y; swap(p,q); printf("%d%d\n",*p,*q);}
以下程序的输出结果是include "stdio.h"int *f(int *x,int *y){ if(*x*y) return x; else return y;}main(){ int a=7,b=8, *p,*q,*r ; p=a; q=b; r= f(p,q); printf("%d,%d,%d\n",*p,*q,*r);}
下列程序的运行结果是______。 main ( ) { int x,*p,**q; x=10; p=x; q=p; printf ("%d\n", **q); }A.10B.9C.8D.11
有以下程序: int*f(int*x,int*y) { if(*<*y)return x; else return y; } main() { int a=7,b=8,*p,*q,*r; p=a;q=b; r=f(p,q); printf("%d,%d,%d\n",*p,*q,*r); } 程序运行后输出结果是______。A.7,8,8B.7,8,7C.8,7,7D.8,7,8
有以下程序:include void f(int * x,int * y) int t;t= *x; *x= *y; *y=t;main ( ){in 有以下程序:#include <stdio.h>void f(int * x,int * y) int t; t= *x; *x= *y; *y=t;main ( ){ int a[8] = { 1,2,3,4,5,6,7,8} ,i, * p, * q; p=a;q =a[7]; while(p<q) { f(p,q) ;p ++ ;q --; } for(i =0;i<8;i ++ ) printf(" % d," ,a[i]); }程序运行后的输出结果是( )。A.8,2,3,4.,5,6,7,1,B.5,6,7,8,1,2,3,4,C.1,2,3,4,5,6,7,8,D.8,7,6,5,4,3,2,1,
下面程序和运行运行结果是【 】。void swap(int * a,int * b){ int * t;t=a; a=b; b=t;}main( ){ intx=3,y=5,* p=&x,* q=&y;swap(p,q);prinff("%d %d\n", *p, *q);}
以下程序运行后的输出结果是() main() {int a[10]={l,2,3,4,5,6,7,8,9,10},*p=&n[3], *q=p+2; printf(”%d\n”,*p+*q); }
以下程序的执行结果是() main( ) { int a, b, *p = a, *q = b; a = 10; b = 20; *p = b; *q = a; printf(“a = %d, b = %d/n”, a, b);
单选题以下选项中,不能对主函数中变量i和j的值进行交换的程序是( )。A#include stdio.hvoid swap(int *p, int *q){ int *t; *t = *p; *p = *q; *q = *t;}main(){ int i=10, j=20,*a=i,*b=j; swap(a,b); printf(i=%d j=%d,i,j);}B#include stdio.hvoid swap(int *p, int *q){ int t; t = *p; *p = *q; *q = t;}main(){ int i=10,j=20,*a=i,*b=j; swap(a,b); printf(i=%d j=%d,i,j);}C#include stdio.h#include stdlib.hvoid swap(int *p, int *q){ int *t; t = (int *)malloc(sizeof(int)); *t = *p; *p = *q; *q = *t; free(t);}main(){ int i=10,j=20; swap(i,j); printf(i=%d j=%d,i,j);}D#include stdio.hvoid swap( int *p, int *q){ int t; t = *p; *p = *q; *q = t;}main(){ int i=10,j=20,*x=i,*y=j; swap(x,y); printf(i=%d j=%d,i,j);}
填空题以下程序的执行结果是() main( ) { int a, b, *p = a, *q = b; a = 10; b = 20; *p = b; *q = a; printf(“a = %d, b = %d/n”, a, b);
填空题以下程序运行后的输出结果是() main() {int a[10]={l,2,3,4,5,6,7,8,9,10},*p=&n[3], *q=p+2; printf(”%d\n”,*p+*q); }
单选题有以下程序:#include void f(int*p,int*q);main(){ int m=1,n=2,*r=m; f(r,n); printf("%d,%d",m,n);}void f(int*p,int*q){ p=p+1; *q=*q+1;}程序运行后的输出结果是( )。A1,3B2,3C1,4D1,2
单选题有以下程序:#include 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,*p,*q);}程序运行后的输出结果是( )。A3,5,5,3B3,5,3,5C5,3,3,5D5,3,5,3