2011年1月3日 星期一

C考前筆記

1.
&& 或 || 是會先check前面的判斷式 , 若成立 , 才會再check 下一個判斷式
而& 或 | 是會判斷所有的判斷式 , 然後再作and 或 or


2.
在c語言中 , static function代表private的意味 , 其他.c檔無法call這個function


3.
function pointer

利用typedef 來宣告 function pointer , 用起來比較方便
typedef int (*CustomOperator)( int );

//void custom_for_each( int *pArray, unsigned int size, int (*op)( int ) )
void custom_for_each( int *pArray, unsigned int size, CustomOperator op )

沒有留言: