[問題] 幾題問題
P幣2000
因為要去面試公司
而C/C++都快忘了
上來求救一下幾題
1. Write a code to swap integer a, b, without temporary variable.
2. Write 3 function: a) set a bit. b) clear a bit, c) inverse a bit.
3. Write a MARCO to calculate the square of integer a.
4. Write one line expression to check if a integer is power of 2
5. Write a function to find the middle field of singled-linked list with
ou
6. Write a code to reverse the linked list. For example: [0] -> [n], [1]
->
7. Find the possible error
Int ival;
Int **p;
Ival = *p;
8. What is the possible error of below SQR function.
int SQR(volatile int *a)
{
return (*a)*(*a);
}
另外還有圖片上的
http://i.imgur.com/OVd5WL7.jpg


謝謝大家的解答
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.20.129
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1429519244.A.2BC.html
※ 編輯: hopeandhmm (223.136.248.152), 04/20/2015 16:49:15
→
04/20 16:51, , 1F
04/20 16:51, 1F
→
04/20 17:10, , 2F
04/20 17:10, 2F
※ 編輯: hopeandhmm (140.112.20.129), 04/20/2015 17:12:14
推
04/20 17:20, , 3F
04/20 17:20, 3F
→
04/20 17:20, , 4F
04/20 17:20, 4F
→
04/20 17:22, , 5F
04/20 17:22, 5F
→
04/20 17:23, , 6F
04/20 17:23, 6F
推
04/20 17:40, , 7F
04/20 17:40, 7F
推
04/20 18:33, , 8F
04/20 18:33, 8F
→
04/20 18:38, , 9F
04/20 18:38, 9F
推
04/20 19:20, , 10F
04/20 19:20, 10F
推
04/20 19:24, , 11F
04/20 19:24, 11F
推
04/21 00:29, , 12F
04/21 00:29, 12F
→
04/21 03:50, , 13F
04/21 03:50, 13F
推
04/21 21:10, , 14F
04/21 21:10, 14F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章