填空题

若有以下定义,则使指针p指向值为35的数组元素的语句是______。
int a[10]=14,27,47,29,35,21,49,71,*p;

【参考答案】

p=a+4或p=&a[4]。
<上一题 目录 下一题>
热门 试题

填空题
以下程序的输出结果是______。 int fun(int*x,int*y) static int m=4; m=*X+*y; *x-=m; *y+=m; return m; main() int a=2,b=6,n; n=fun(&a,&B) ;printf( %d, ,n); n=fun(&a,&B) ; printf( %d n ,n);
填空题
fun1函数的功能是将3个整数按由大到小的顺序调整后依次放入a、b、c3个变量中,a中放最大数,fun2函数的功能是交换两个变量中的值。补足所缺语句。 fun2(int*x,int*y) int t; t=*x;*x=*y;*y=t; fun1(int*p1,int*p2,int*p3) if(*p3>*p2) fun2(*P2,*p3); if(*p1<*p3) fun2(______); if(*p1<*p2) fun2(______); main() int a,b,c; scanf( %d%d%d ,&a,&b,&c) ; fun1(&a,&b,&c) ; printf( %d,%d,%d n ,a,b,c) ;
相关试题
  • 以下程序的运行结果是______。 int...
  • 以下函数用以求y的x次方。补足所缺语句。 ...
  • 想通过以下输入语句给x赋值2,给y赋值3,...