作者hicoy ()
站內TransCSI
標題[問題] 幾題計概
時間Sun Jul 3 22:34:52 2005
1.please exolain the difference between ohysical address and virtual address
and how a virtual address is translated to a physical address
2.Please write a C program that exhibits the problem of memory leakage.Please
write another C program that exhibits the problem of a dangling pointer.
3.Consider a tree as a connected,acyclic,undirected graph,Which of the follow
-ing statements is false?
1)A tree that has n vertices contains n edges.
2)Any two vertices in a tree are connected by a nuique simple path.
3)If an edge is deleted from a tree,theresulting graph become disconnected
4)If a new edge between a pair of nonadjacent vertices is added in a tree,
rhe resultant graph has a cycle.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.166.130.178
推 flyfound:3. selection no.1 : n-1 edges218.166.221.123 07/04
推 dynamicy:第二題去年台聯大的,參考C語言記憶體遺漏和指標 218.170.45.107 07/04
→ dynamicy:和指標震盪,提示...會用到C++的指令 218.170.45.107 07/04
推 dynamicy:嗯....free();其他想想看吧! 218.170.45.107 07/04
推 wasiseal:是要寫成沒回收然後後來無法分配嘛??? 61.216.112.240 07/06
推 dynamicy:對...就這麼簡單... 218.170.40.155 07/06