已知 main函数中有声明“ int a=3, b=4; ”,若在 main函数中通过执行语句“ swap(&a, &b); ”交换a、b变量的值,则下列 swap函数定义正确的是()
A. void swap(int x, int y){ int t; t=x; x=y; y=t; }
B. void swap(int *x, int *y){ int t; t=*x; *x=*y; *y=t; }
C. void swap(int *x, int *y){ int *t; t=x; x=y; y=t; }
D. void swap(int *x, int *y){ int *t; t=*x; *x=*y; *y=t; }
查看答案
若有一函数定义为int fun(int x, int *y){ return (*y)/x; }该函数的函数原型额正确形式是()
A. void fun(int ,int);
B. int *fun(int ,int *)
C. int fun(int *, int *);
D. int fun(int, int *);
下面程序的功能是:从键盘上输入若干个整数,按升序排序后输出,请填空使程序完善。#include void sort(int *a, int n){ int i,j,t;for (i=0; 【1】 ;i++){for (j=0;j
We all know that Chinese is our language
A. normal
B. lucky
C. nice
D. native
College students are expected to second language
A. attend
B. adjust
C. master
D. suppose