- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Chapter 10 结构体
* * * * * * * * * * * * * * * * * * * @ McGraw-Hill Education PROPRIETARY MATERIAL. ? 2007 The McGraw-Hill Companies, Inc. All rights reserved. No part of this PowerPoint slide may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this PowerPoint slide, you are using it without permission. Structures and Unions 学号 姓名 性别 年龄 计算机原理 C语言 操作系统 1 杜 明 男 20 90 83 82 2 王 涛 男 21 78 92 78 3 赵丽丽 女 21 89 72 66 4 任莹 女 21 78 95 90 5 …… 6 …… 思考:如何保存这种表格数据? * * 10.1 Introduction Arrays represent a group of data items of same type. Cannot represent data of different types. Structures pack data of different types. represent a set of attributes 本章内容 结构体定义 结构体变量声明 存取结构体成员变量 结构体初始化 求结构体所占字节数 * * 10.2 Defining a Structure Unlike arrays, structures must be defined first for their format that may be used later to declare structure variables. 结构体必须先定义其格式,然后才能用它来声明结构体变量 这点与数组不同 * * 10.2 Defining a Structure Consider a book database consisting of book name, author, number of pages, and price. We can define a structure to hold this information as follows: struct book_bank char title[20]; char author[15]; int pages; float price; ; 一种用户自定义的类型 成员变量 结构体名 模版需以“;”结束 * * 10.2 Defining a Structure The above definition describes a format called template to represent information as shown below: array of 20 characters array of 15 characters integer float title author pages price * * 10.3 Declaring Structure Variables For example, the statement struct book_bank book1, book2, book3; declares book1, book2, book3 as variables of type struct book_bank Each one of these variables has four members as specified by the template. * * 10.3 Declaring Structure Variables The complete declaration might look like this: struct book_bank char title[20]; char autho
您可能关注的文档
- A60-07T030WD球泡灯产品技术规格书.doc
- A4 第七次.docx
- A Tour to Australia.ppt
- a song of ice and fire.ppt
- Aaron亚伦.doc
- A2-NuclearPhysics.ppt
- Abb 800xA train doc -chapter 3 - Project Framework-Exercise_3.4_cn.doc
- ABB DCS AC800chapter2.doc
- Abb 800xA train doc -chapter 3 - Project Framework-Exercise_3.3_cn.doc
- Abmokog英语六级词汇记忆法.doc
最近下载
- 四年级语文下册《铁杵成针》导学案教案教学设计集体备课.doc VIP
- 幼儿通识性知识大赛考试总题库-上(单选题部分).docx VIP
- 3 桂花雨 教案 2025-2026学年五年级语文上册 统编版.docx VIP
- 梅毒血清学检测的操作规范课件.ppt VIP
- 《无损检测》射线检测课件.pptx VIP
- 4 珍珠鸟 教案 2025-2026学年五年级语文上册 统编版.docx VIP
- 《桂枝香·金陵怀古》ppt课件(21页).ppt VIP
- 2025至2030中国衣架行业市场深度研究与战略咨询分析报告.docx
- 2025年重庆一中中考数学三模试卷(含答案).pdf VIP
- 2021年重庆一中中考数学诊断试卷.pdf VIP
文档评论(0)