⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 6.6.5e.htm

📁 建立《编译原理网络课程》的目的不仅使学生掌握构造编译程序的原理和技术
💻 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>&nbsp&nbsp&nbsp&nbsp</td>
<td class="content">


6.7 判断题&nbsp;<br>&nbsp;&nbsp;&nbsp; (a)              
对于允许递归调用的程序语言,程序运行时的存储分配策略不能采用静态的存储分配策略。(              
)<br>&nbsp;&nbsp;&nbsp; (b)              
若一个程序语言的任何变量的存储空间大小和相互位置都能在编译时确定,则可采用静态分配策略。(              
)<br>&nbsp;&nbsp;&nbsp; (c)              
在不含嵌套过程的词法作用域中,若一个过程中有对名字a的非局部引用,则a必须在任何过程(或函数)外被说明。(              
)<br>&nbsp;&nbsp;&nbsp; (d)              
在允许嵌套的词法作用域的语言中,过程不能作为参数,原因时不能建立其运行环境的存取链。(              
)<br>&nbsp;&nbsp;&nbsp; (e)              
在堆式存储分配中,一个堆中存活的活动记录不一定是邻接的。(              
)<br>&nbsp;&nbsp;&nbsp; (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 从供选择的答案中,选出应填入下面叙述中(&nbsp; ?&nbsp; )内的最确切的答案。<br>              
&nbsp;&nbsp;&nbsp; 运行时的存储分配策略分(&nbsp; A&nbsp; )和(&nbsp;             
B&nbsp; )两类。(&nbsp; B&nbsp; )又分(&nbsp; C&nbsp; )和(&nbsp; D&nbsp; )。一个语言中不同种类的变量根据定义域和生存期的不同往往采用不同的存储分配策略,C语言中的静态变量往往采用(&nbsp;             
A&nbsp; ),而自动(out)类变量往往采用(&nbsp; C&nbsp; )。使用mallac中申请的内存单元采用(&nbsp;             
D&nbsp; )。<br>  &nbsp;&nbsp;&nbsp; 供选择答案  <br> &nbsp;&nbsp;&nbsp;            
A,B,C,D: <br> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;           
mso-hansi-font-family:&quot;Times New Roman&quot;">①栈式分配&nbsp;&nbsp;&nbsp;&nbsp; 
②最佳分配&nbsp;&nbsp;&nbsp;&nbsp; ③堆式分配<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
④静态分配&nbsp;&nbsp;&nbsp;&nbsp; ⑤随机分配&nbsp;&nbsp;&nbsp;&nbsp; 
⑥</span><span style="font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">动态分配</span>&nbsp; 
<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>&nbsp;&nbsp;&nbsp;         
为C语言程序的运行设计内存分配方案。包括:<br>&nbsp;&nbsp;&nbsp;         
(a) C语言程序运行时的内存划分(或布局)。<br>&nbsp;&nbsp;&nbsp;         
(b) 运行栈的管理,非局部名字的访问。<br>&nbsp;&nbsp;&nbsp; (c)         
翻译时把一个C函数中的变量映射到活动记录上(或组织C函数的活动记录)。<br>&nbsp;&nbsp;&nbsp;         
(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 + -