📄 6.6.5e.htm
字号:
<html>
<head>
<title>编译原理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/specification.css">
</head>
<BODY>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='6.6.5d.htm'" ></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='../c_7/7.0.htm'"></img></td>
</tr>
</table>
<br><br>
<font class="title2"><b>练习</b></font>
<table><tr><td>    </td>
<td class="content">
6.7 判断题 <br> (a)
对于允许递归调用的程序语言,程序运行时的存储分配策略不能采用静态的存储分配策略。(
)<br> (b)
若一个程序语言的任何变量的存储空间大小和相互位置都能在编译时确定,则可采用静态分配策略。(
)<br> (c)
在不含嵌套过程的词法作用域中,若一个过程中有对名字a的非局部引用,则a必须在任何过程(或函数)外被说明。(
)<br> (d)
在允许嵌套的词法作用域的语言中,过程不能作为参数,原因时不能建立其运行环境的存取链。(
)<br> (e)
在堆式存储分配中,一个堆中存活的活动记录不一定是邻接的。(
)<br> (f)
如果源程序正文中过程p直接嵌入在过程q中,那么,p的一个活动记录中的存取链接指向q的最近的活动记录。(
)<br>
<table align=center width=70%>
<tr><td align=right>
<img src="../images/key.gif" onmouseover="javascript:style.cursor='hand'" onclick="javascript:window.open('key/a_6.7.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=450')"></img>
</td></tr>
</table>
<hr size=2 align=center color=red><br>
6.8 从供选择的答案中,选出应填入下面叙述中( ? )内的最确切的答案。<br>
运行时的存储分配策略分( A )和(
B )两类。( B )又分( C )和( D )。一个语言中不同种类的变量根据定义域和生存期的不同往往采用不同的存储分配策略,C语言中的静态变量往往采用(
A ),而自动(out)类变量往往采用( C )。使用mallac中申请的内存单元采用(
D )。<br> 供选择答案 <br>
A,B,C,D: <br>
<span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">①栈式分配
②最佳分配 ③堆式分配<br>
④静态分配 ⑤随机分配
⑥</span><span style="font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">动态分配</span>
<table align=center width=70%>
<tr><td align=right>
<img src="../images/key.gif" onmouseover="javascript:style.cursor='hand'" onclick="javascript:window.open('key/a_6.8.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=450')"></img>
</td></tr>
</table>
<hr size=2 align=center color=red><br>
6.9 内存分配方案设计:<br>
为C语言程序的运行设计内存分配方案。包括:<br>
(a) C语言程序运行时的内存划分(或布局)。<br>
(b) 运行栈的管理,非局部名字的访问。<br> (c)
翻译时把一个C函数中的变量映射到活动记录上(或组织C函数的活动记录)。<br>
(d) 给出一个简单的堆管理方案。<br>
<table align=center width=70%>
<tr><td align=right>
</td></tr>
</table>
<hr size=2 align=center color=red><br>
<br>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='6.6.5d.htm'" ></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='../c_7/7.0.htm'"></img></td>
</tr>
</table>
</BODY>
<html><script language="JavaScript">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -