精華區beta Tech_Job 關於我們 聯絡資訊
※ [本文轉錄自 C_and_CPP 看板] 作者: skyracer (張開手心擁有世界) 看板: C_and_CPP 標題: [問題] 幾個今天去面試遇到的問題 時間: Tue Apr 20 02:15:40 2010 我對OS比較不熟 之前是作3D graphics的 轉去面試embedded system 算是開始學習 有幾個問題我把他背下來, 可否幫忙 1. semaphore is assigned by ?? 2. can each thread call any function? (I think Yes, why not) each thread has its own semaphore(I think Yes) Each thread has its own function(I think no!為何要限定function) 我的觀念是thread就是process的某1run的運作過程, 所以會呼叫哪些function 要depends on 怎麼運作. 不應該有限定只能用哪些function 3. RTOS: a. thread preemption is not allowed. b. two threads can have the same priority c. thread has a priority d. thread priority is assigned by CPU 我覺得b是錯的 這樣應該會讓系統變嫚吧 要等待(算是dead lock?) 4. struct point { int x; int y; }kk; a. sizeof(kk) >= sizeof(x) + sizeof(y) b. sizeof(kk) < sizeof(x) + sizeof(y) c. sizeof(kk) == sizeof(x) + sizeof(y) d. sizeof(kk) != sizeof(x) + sizeof(y) 我沒程式可以測試 但我估計應該是a 5. struct point { int x; int y; }; a. memory is allocated for point b. memory is allocated for x and y a吧 6. unsigned int a = 0x74; printf("%u", a>>4); 0x07? 7. char **pp; char *ptr2countries[] = {"America", "Taiwan", "China"}; pp = ptr2countries; pp++; printf("%s", (*pp + 1)); "aiwan"吧? 8. What is the output? char str[] = "Love"; char *p = str; printf("%c", *p++); *p應該比p++優先權高 所以應該是L L+1變成M 9. unsigned short int k = 0x74; k = k | k; k = k ^ k; printf("%d", k); 10. 為什麼一般負號我們是用2's complement system? -- 流淚了 http://www.youtube.com/watch?v=rrxOBxlQmho
街舞的新里程碑 街舞才發展10幾20年 憲在也有人在思考之前現代舞走過的路子了 不一定要完全的follow beat~~ 也可以是很肢體去表現舞者的情感 音樂變成是輔助 就像是現代舞那樣~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.32.58.171 -- 流淚了 http://www.youtube.com/watch?v=rrxOBxlQmho
街舞的新里程碑 街舞才發展10幾20年 憲在也有人在思考之前現代舞走過的路子了 不一定要完全的follow beat~~ 也可以是很肢體去表現舞者的情感 音樂變成是輔助 就像是現代舞那樣~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.32.58.171