>第 8 章 数组>数组的基本操作

码匠 code_smith@sohu.com
2009-09-06 21:01:44

I'm confused about unary operator and postfix operator. Acutally prefix and posfix operator are all unary operator, right? 

 Why Mr. Song calls postfix operator as postfix, but calls prefix operator as unary? I cann't understand it! Why?


宋劲杉 songjinshan@gmail.com
2009-09-24 21:47:36

Because that's what C99 calls it.


cd whu.chengda@gmail.com
2009-11-28 18:12:32

数组赋值有个问题弄不明白,请教一下:
void foo(int test[3]);
int test1[3] = {1, 2, 3};
foo(test1); //可以
int test2[3] = test1; //不可以

为什么都是将数组名(右值,转换为指针)赋值给一个数组,一个可以,一个却不行捏?


宋劲杉 songjinshan@akaedu.org
2009-12-27 15:27:34

谢谢指出!这个地方我解释得稍微有些不足,我只说了数组名传给函数是在传指针,而没有说函数的形参这么写也是声明一个指针类型而不是声明数组类型。


如果您有建设性意见,哪怕只是纠正一个错别字,也请不吝赐教,您留下的姓名和email将会出现在本书前言的致谢中。再次感谢您的宝贵意见!