Re: [問題] 元智91年的轉學考考古題
※ 引述《sss955212 (靈魂的缺角)》之銘言:
1. Consider the following procedure.If the argument n is 5,what will the
procedure return?
procedure SUM(n:integer)
{if n=1
return(0)
else
return(SUM(n-1)+n*(n-1))
}
答案是 24 嗎??
SUM(5)=SUM(4)+5*4=20+20=40
SUM(4)=SUM(3)+4*3=8+12=20
SUM(3)=SUM(2)+3*2=2+6=8
SUM(2)=SUM(1)+2*1=2
SUM(1)=0
2.Show that if xy=0,then x⊕y=x+y.
什麼是⊕??
3. Sort the following elements of the memory hierarchy interm of access speed.
(a)Main memory (b)Harddisk (c)L1 Cache (d)Network (e)CPU registers
(f)L2 Cache
答案:ecfabd Network是memory嗎?
錯,電腦內部傳輸會比外部快
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.175.184.144
推
05/28 13:29,
05/28 13:29
→
05/28 13:30,
05/28 13:30
推
05/28 13:37,
05/28 13:37
推
05/28 15:09,
05/28 15:09
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.123.22.125
※ 編輯: dynamicy 來自: 140.123.22.125 (05/28 15:27)
→
05/28 15:28, , 1F
05/28 15:28, 1F
討論串 (同標題文章)
完整討論串 (本文為第 3 之 8 篇):