作者privatewind (伤神客)
看板Grad-ProbAsk
标题Re: [理工] [计概] 两个题目恳请高手帮忙!
时间Tue Sep 28 22:25:38 2010
※ 引述《st84514 (综合水果武士)》之铭言:
: (1).
: Consider the given array-implemented stack. Please given the output value of
: the POP operation and draw the stack after each POP or PUSH operation.
: Operation:POP,POP,POP,PUSH’c’,PUSH’d’.
: STACK:
: 0 1 2 3 4 5 6 7 8 9
: |A | B | | | | | | | | |
我会觉得这题出错了…
pop三次? 当然了硬要写的话就是如下
POP: output: B
0 1 2 3 4 ...
A
POP: output: A
0 1 2 3 4 ...
POP: Error: stack is empty!!
PUSH D
0 1 2 3 4 ...
C
PUSH D
0 1 2 3 4 ....
C D
: (2).
: If, in a single contiguous memory management system for the main memory with
: 64K Bytes, the program is loaded at address 30215,compute the physical
: addresses(in decimal) that corresponds to the following logical addresses:
: (1)8223;(2)1302
(1) 30215 + 8223= 38438
(2) 30215 + 1302= 31517
(这题有这麽简单? XD)
: 恳请高手帮忙解答...
: 感激不尽!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.126.187.85