几道笔试题目,大家讨论哈
qong 2005-11-09 01:55:34 1.设计函数 int atoi(char *s)
2. What do the following declarations mean?
(1)const int a;
(2)int const a;
(3)const int *a;
(4)int * const a;
(5)int const * a const;
3.编程
将整数转换成字符串:void itoa(int,char);
例如itoa(-123,s[])则s=“-123”;
4.10个人分成4组 有几种分法?(程序)(不能重复,如:1,1,1,7=7,1,1,1)
5.如图:
7 8 9 10
6 1 2 11
5 4 3 12
16 15 14 13
设“1”的坐标为(0,0) “7”的坐标为(-1,-1) 编写一个小程序,使程序做到输入坐标(X,Y)之后显示出相应的数字。
6.编最优化Bubble(int *pIntArray,int L),要求:交换元素不能用临时变量,如果有序需要最优。