版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Answer to AssignmentsAssignment(1)please write down internal representation of following types? typedef struct char name10; int age; person; typedef person List10; typedef union int data; real length; char name4;Test; Internal representation of Struct/UnionSize Kind BodystructTy/unionTy Body: 指向联合体中
2、域定义链表指向联合体中域定义链表 Size: 所有域的类型的所有域的类型的sizesize中最大值中最大值; ;BodyFieldTypeOffsetFieldNameNexttypedef struct char name10; int age; person;Size Kind BodystructTyintPtrnilage010arrayKind09charPtr10personPtr11nametypedef person List10;110arrayKind09personPtrListPtrtypedef union int data; real length; char na
3、me4;Size Kind BodyunionTyintPtr0TestPtrrealPtr00nil4arrayKind03charPtr4datelengthnameAssignment(2) Please write down the content of the symbol table at following point 1- 4? (localized symbol table and globalized symbol table) typedef struct char name30; int age; Student; Student Lee; int i ; int Ge
4、tAge(Student S) return S.age; void SetAge( int i) Lee.age=i; void main() student Lee; SetAge(10); int i = 20; Lee.age = i;1234Localized Symbol table at Scope栈栈031structTyintPtrnilage030arrayKind029charPtr30student typeKindnameLocalized Symbol table at 0studenttypeKindScope栈栈LeevarKind00diriintPtrvar
5、Kind031dirGetAgeintPtr routeKind0pPtr1SvarKind10dirstudentPtrLocalized Symbol table at 0studenttypeKindScope栈栈LeevarKind00dirivarKind031dirSetAgevoidrouteKind0pPtr1ivarKind10dirstudentPtrintPtrGetAgeintPtr routeKind0pPtrintPtrLocalized Symbol table at 0studenttypeKindScope栈栈LeevarKind00dirivarKind03
6、1dirmainvoidrouteKind0pPtr1leevarKind10dirstudentPtrivarKind131dirintPtrSetAgevoidrouteKind0pPtrGetAgeintPtr routeKind0pPtrintPtrExercise Please write down (level,offset) at different blue points of following program. If at point 0 it is (L, Off). typedef struct char name30; int age; Student; Student Lee; int i ; int GetAge(Student S) return S.age; void SetAge( int i) Lee.age=i; void main() student Lee; SetAge(10); int i = 20; Lee.age = i; int j = 30; Lee.age = i; 123456789101112130position
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年江西师范高等专科学校单招职业技能考试备考试题含详细答案解析
- 2026年青岛远洋船员职业学院单招综合素质笔试参考题库含详细答案解析
- 2026年朔州师范高等专科学校单招职业技能考试模拟试题含详细答案解析
- 2026年广西科技师范学院单招综合素质考试参考题库含详细答案解析
- 2026年南京城市职业学院单招综合素质考试备考题库含详细答案解析
- 2026年浙江经贸职业技术学院单招职业技能考试备考题库含详细答案解析
- 2026年湖南城建职业技术学院单招综合素质笔试备考试题含详细答案解析
- 2026年郑州工业安全职业学院单招综合素质笔试备考题库含详细答案解析
- 2026年安徽工贸职业技术学院单招综合素质笔试备考题库含详细答案解析
- 2026年石家庄人民医学高等专科学校高职单招职业适应性测试备考试题及答案详细解析
- 2025大模型安全白皮书
- 2026国家国防科技工业局所属事业单位第一批招聘62人备考题库及1套参考答案详解
- 工程款纠纷专用!建设工程施工合同纠纷要素式起诉状模板
- 2026湖北武汉长江新区全域土地管理有限公司招聘3人笔试备考题库及答案解析
- 110(66)kV~220kV智能变电站设计规范
- (正式版)DB44∕T 2784-2025 《居家老年人整合照护管理规范》
- 2025年美国心脏病协会心肺复苏和心血管急救指南(中文完整版)
- (2025年)教育博士(EdD)教育领导与管理方向考试真题附答案
- 1、湖南大学本科生毕业论文撰写规范(大文类)
- 基于多源数据融合的深圳市手足口病时空传播模拟与风险预测模型构建及应用
- 咯血的急救及护理
评论
0/150
提交评论