版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 4-1实验测定玻璃的折射率课件
- 2025年全国计算机应用水平考试NIT人工智能基础高级真题模拟考试
- 2025年全国计算机二级ms考试题库及答案
- 2025年内部审计笔试题及答案
- 急诊护士个人鉴定
- 走进三国阅读教学设计
- 教师个人师德考核
- 成都婚纱行业分析报告
- 阅书斋英文阅读教学设计
- 院感自查存在的问题及整改措施
- 2026年黑龙江省法官逐级遴选考试题及答案
- 2026年秋季开学教师教师心理健康培训课件
- 2026年宿迁市城区招商发展有限公司招聘工作人员4人笔试模拟试题及答案详解
- 2026年内蒙古中考历史试卷(含详细答案解析)
- 2026年全国导游基础知识真题卷及答案(共十六套)
- 全球关键矿产资源的空间分布特征
- (2026年)中小学阳光招生专项行动课件
- 2026年UTV全地形车行业分析报告及未来发展趋势报告
- (正式版)DB44∕T 2829-2026 高处作业吊篮安装检验评定标准
- TSG08-2026《特种设备使用管理规则》解析
- 临床左下肢动脉栓塞患者护理查房
评论
0/150
提交评论