扫描二维码,下载手机APP
下载安卓APP箭头
客服QQ
箭头给我发消息

客服QQ:2698585038

C语言程序设计——增量式项目驱动一体化教程

综合评级:
★★★★★

定价:
¥36.00

作者:
苑俊英 主编

出版社:
电子工业出版社

出版日期:
2015年9月

页数:
240

字数:
396000

ISBN:
9787121263446

书籍介绍

本书以案例驱动,将案例贯穿整本书的教学内容,循序渐进、由浅入深;采取知识点与案例实现相对应的方式,安排教学内容;采用增量式的程序设计模式进行内容安排,对任务进行分解、简化问题;*终使学生既能掌握编程语言的思想和方法,又能学有所获。本书可作为高等院校计算机及相关工科类专业学生的教材。

作者简介

苑俊英,女,2007年至今在中山大学南方学院任教,从事C语言程序设计、数据结构、数据库系统概论、编译原理、计算机应用基础等课程的理论教学及实践教学工作。

目录

第1 章 初识C 语言 ············································································································ 1

1.1 C 语言概述 ··························································································· 1

1.2 C 语言开发环境 ····················································································· 2

1.2.1 运行C 语言程序的步骤和方法 ············································································ 2

1.2.2 *简单的C 语言程序 ························································································ 3

1.3 算法 ···································································································· 4

1.3.1 算法的定义 ···································································································· 4

1.3.2 算法的表示 ···································································································· 4

1.3.3 算法举例 ······································································································· 7

本章小结 ···································································································· 10

习题1 ······································································································· 10

第2 章 C 语言知识在实践中的应用 ·················································································· 11

2.1 案例介绍 ····························································································· 11

2.2 案例分析 ····························································································· 12

2.2.1 显示单个数字 ································································································ 12

2.2.2 依次显示数字 ································································································ 14

2.2.3 无限次或有限次循环显示数字0~9 ····································································· 15

2.2.4 循环显示任意一位指定数字 ·············································································· 15

2.2.5 保存显示过的所有数字 ···················································································· 15

2.2.6 显示多位整数或小数 ······················································································· 15

2.3 增量划分和进度安排 ·············································································· 16

2.4 LED 数码管接口文件 ············································································· 16

本章小结 ···································································································· 18

第3 章 基本数据类型 ······································································································· 19

3.1 基本技能 ····························································································· 19

3.1.1 C 语言的数据类型 ·························································································· 19

3.1.2 标识符 ········································································································· 21

3.1.3 常量 ············································································································ 21

3.2.4 变量 ············································································································ 23

3.2.5 数据的输入、输出 ·························································································· 26

3.2 增量式项目驱动 ···················································································· 31

本章小结 ···································································································· 33

习题3 ······································································································· 34

第4 章 运算符与表达式 ··································································································· 37

4.1 基本技能 ····························································································· 37

4.1.1 算术运算符 ··································································································· 38

4.1.2 关系运算符 ··································································································· 40

......

前言

  本书是作者多年教学和实践经验的总结,按照增量式项目驱动一体化的教学模式安排教学内容,融知识点、实践案例于一体,重点讲解如何将各知识点应用于实践。

  由于大一新生初次接触程序设计语言,以及C 语言上课枯燥的特点,本教材教学团队抛弃传统教材单纯讲解C 语言语法的形式,将知识点贯穿于案例中,以案例驱动,循序渐进、由浅入深;

  采取知识点与案例相对应的方式,安排教学内容;采用增量式的程序设计模式安排教学内容,将任务进行分解、简化问题;*终使读者既能掌握编程语言的思想和方法,又能学有所获。

  本书为广东省教育厅“育苗工程(自然科学)”之“计算思维与应用型人才培养结合下的计算机专业基础课程建设”项目成果之一。

  书中每章都列出了核心知识点,并通过简单、可理解的示例,帮助读者理解和掌握核心知识的应用,增量式项目驱动能够训练读者编程能力、知识点的综合应用能力。

  第1 章主要讲解C 语言的基本概念、C 语言开发环境和C 程序的开发步骤,要求读者初步认识C 语言,并通过C 语言开发环境开发简单的C 程序。

  第2 章介绍增量项目——LED 数码管,并对整个项目进行了增量划分,将每个增量与后续的章节进行知识点与增量任务的对应。

  第3 章介绍C 语言的基本数据类型,要求读者熟练使用C 语言数据类型来定义数据。

  第4 章介绍C 语言的运算符和表达式,要求读者熟练应用各种运算符和表达式进行计算和语句表达。

  第5 章介绍选择结构程序设计,第6 章介绍循环结构程序设计,要求读者掌握使用控制结构进行复杂程序设计的能力。

  第7 章介绍函数的结构、函数的定义和调用等内容,要求读者掌握用函数进行模块化程序设计的思想,并在LED 数码管增量上使用函数对功能模块进行了封装。

  第8 章介绍数组,强调数组在解决实际问题中的重要性及使用。

  第9 章介绍C 语言的重要内容——指针,用简单明了的方式介绍了指针的应用。

  第10 章介绍字符串的应用。

  第11 章介绍结构体、共用体和枚举类型。

  第12 章结合实例介绍文件的操作和使用。

  第13 章简单介绍C 语言中的预编译命令。

  本书在内容上侧重C 语言基本语法的学习和应用,采用增量的方式贯穿整全书,并介绍了一个LED 数码管程序的开发过程,适合初学者对C 语言的理解,并通过对案例的学习和模拟,将C 语言基本技能实现其他应用。

  本书采用开源软件CodeBlocks 作为C 语言开发环境,CodeBlocks 可以从官方网站下载、安装和使用。本书还配有《C 语言程序设计实验及习题指导》(ISBN 978-7-121-26345-3),可以作为与本书配套的实验教材。

  本书可以作为计算机及相关专业程序设计课程的教学用书,不同专业在讲授时可根据学生、学时等具体情况有选择讲授不同章节的内容,还可以作为计算机等级考试的学习或参考用书。

  对于计算机专业的学生,建议授课学时为54+36 学时,其中54 学时为课堂讲授,36 学时为上机实验。各章节学时分配可参考如下。

  课程内容 学时(理论+实验)

  第1 章 初始C 语言 2+1

  第2 章 C 语言知识在实践中的应用 1+1

  第3 章 基本数据类型 3+2

  第4 章 运算符与表达式 6+4

  第5 章 选择结构程序设计 6+4

  第6 章 循环结构程序设计 6+4

  第7 章 函数调用 6+4

  第8 章 数组 6+4

  第9 章 指针 6+4

  第10 章 字符串处理 3+2

  第11 章 结构体、共用体和枚举 4+2

  第12 章 读写文件 3+2

  第13 章 预编译命令 2+2

  本书第1~3 章由陈海山编写,第4~7 章由苑俊英编写,第8~9 章由温泉思编写,第10~12 章由谭志国编写,第13 章由曹惠茹编写。书中LED 数码管案例的增量实现由陈海山、李瑞程完成,全书由苑俊英负责统稿和定稿。

  本书在编写过程中得到了中山大学信息科学与技术学院杨智教授、中山大学南方学院洪维恩教授的支持与帮助,在此表示诚挚的谢意。在本书编写过程中,中山大学南方学院的李瑞程、佘聪、白凯凯、李浩铭等同学参与了本书代码的测试工作。同时感谢电子工业出版社及所有编辑为本书完成所做的工作。

  由于作者水平有限,编写时间仓促,在本书中难免有一些错误,恳请读者提出宝贵建议。