--- title: joe-U16(徐郁淞) categories: User ... 學歷 ----------------------- - 臺北科技大學 電機工程系(2016-2020) - 成功大學 資訊所(2020~) 聯絡資訊 ----------------------- - Email: `tand23744@gmail.com` - GitHub: [joe-U16](https://github.com/joe-U16) 2020秋季班 個人評量 ======================= (秋季班)作業及筆記 ----------------------- - [lab0](https://hackmd.io/@joe-U16/rJa33IG4P) / [GitHub](https://github.com/joe-U16/lab0-c) - [quiz1](https://hackmd.io/@joe-U16/rkKLwyFNv) / [GitHub](https://github.com/joe-U16/NCKU-system-software/tree/main/quiz1) - [quiz2](https://hackmd.io/@joe-U16/B1G8xMjrv) / [GitHub](https://github.com/joe-U16/NCKU-system-software/tree/main/quiz2) - [quiz3](https://hackmd.io/@joe-U16/SkNycSsrw) / [GitHub](https://github.com/joe-U16/NCKU-system-software/tree/main/quiz3) - [quiz4](https://hackmd.io/@joe-U16/ry7ILIp8P) - [quiz5](https://hackmd.io/@joe-U16/HJYSuY6Lw) / [GitHub](https://github.com/joe-U16/NCKU-system-software/tree/main/quiz5) - [quiz6](https://hackmd.io/@joe-U16/rJrCMFVjD) - [kcalc](https://hackmd.io/@joe-U16/rJwLELO3P) / [GitHub](https://github.com/joe-U16/kcalc-fixed) 題目: ----------------------- a) 知道 x - y < 0 敘述為何不能寫為 x < y 嗎? (CS:APP 第 2 章) Ans: 前者使用減法,可能造成整數溢位,導致兩者行為不一致。 e.g. ``` >>> print 0U-1<0 $1 = 0 >>> print 0U < 1 $2 = 1 ``` c) 知道 void (*signal(int sig, void (*handler)(int))) (int); 這樣的宣告該如何解讀嗎? Ans: 1. signal is a pointer to a function that takes two parameters: 1. sig is a parameter to an int and 2. handler is a pointer parameter takes int to void 2. and takes int 3. and returns to void (秋季班)心得 -----------------------