计算机程序设计基础ppt培训课件

上传人:bin****86 文档编号:52439359 上传时间:2018-08-21 格式:PPT 页数:46 大小:501KB
返回 下载 相关 举报
计算机程序设计基础ppt培训课件_第1页
第1页 / 共46页
计算机程序设计基础ppt培训课件_第2页
第2页 / 共46页
计算机程序设计基础ppt培训课件_第3页
第3页 / 共46页
计算机程序设计基础ppt培训课件_第4页
第4页 / 共46页
计算机程序设计基础ppt培训课件_第5页
第5页 / 共46页
点击查看更多>>
资源描述

《计算机程序设计基础ppt培训课件》由会员分享,可在线阅读,更多相关《计算机程序设计基础ppt培训课件(46页珍藏版)》请在金锄头文库上搜索。

1、单击此处编辑母版标题样式单击此处编辑母版副标题样式*11 计算机程序设计基础计算机程序设计基础( C C )2C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under what condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned m

2、atrix, prove that when satisfy the certain condition, we have课 程 目 标掌握编程方法与思路l树立正确的程序设计思考方法,打好基础训练抽象思维l抽象贯穿程序设计与开发活动的始终,对抽象的理 解与把握严重影响着程序的质量与效率l程序越抽象就越通用,也越合理l程序能不能解决此问题?能不能解决另一个问题? 增强解决实际问题的能力突出“基础” ,语言学习并不是主要的,关键是方法、思路与抽象 思维的培养3C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一

3、人一灯Changing the inequality into equality under what condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain condition, we have 几个基本概念程 序l一系列遵循一定规则并正确完成一定功能的代码或指令 序列l对程序的描述:程序=数据结构+算法程序设计l按照任

4、务需要,设计数据结构与算法,编写代码并测试 其正确性,得到正确运行结果的过程算 法l问题的求解方法与步骤,不允许存在二义性l算法设计过程是逐步求精,常使用流程图描述算法数据结构l数据对象、相互关系及构造方法,与算法关系密切4C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under what condition is the current research key point. This paper uses the a

5、nd its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain condition, we haveC 语言的标识符字符集:ASCII字符集大小写英文字母、数字、部分特殊符号标识符 (P13)l定义:以下划线_或字母开头,由下划线、字母、 数字组成,表示常量、变量、函数、类型等名称l保留字(关键字):系统专用具有特定意义的标识符l预定义标识符:编译命令与库函数名,具有特定意 义,一般不能重新定义l用户定义标识符:用户根据需要定义,主要是为了 使程序容易阅读、理

6、解与维护会判断标识符5C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under what condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain c

7、ondition, we haveC 语言程序的结构特点(P15 )C语言程序由一个或多个函数组成,且必 须含有惟一一个名为main的主函数函数是C程序的基本单位程序执行由主函数main开始,到main结 束。其他函数由主函数调用或间接调用。程序执行流程与函数定义顺序无关,主函 数可以在程序文件的任何位置 每个函数包含函数头与函数体两部分6C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under what conditi

8、on is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain condition, we haveC 语言程序 的编译与执行7C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equalit

9、y under what condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain condition, we have C 语言数据类型 在程序中对用 到的所有数据 都 必须指定其数据 类型。8C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况

10、即便是,一人一灯Changing the inequality into equality under what condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain condition, we have整型常量的表示十进制、十六进制(0x开头)、八进制(0开头)实型常量的表示一般形式(小数表示)、指数形式: 1.23e

11、-4字符型常量的表示l 如:a、 +、7、n字符串常量的表示l 例:“AnHui”、 “Programming in C”注意:字符串的长度n,占用n+1字节,最后一 个字节存储NULL字符(0)。常量指数 必须为整数尾数 不能省略#define 标识符 常量9C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under what condition is the current research key point. Th

12、is paper uses the and its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain condition, we have 变量变量的定义:在程序执行过程中,其值改变的量l系统为每个变量分配合适的存储空间,以存放其值 注意:变量要初始化注意:变量要初始化变量的四个基本特征(特性):VANTl值(value):在任一时刻,每个变量均具有惟一值l地址(address):每个变量均具有惟一地址,且除非 其生命结束,地址不可更改l名称(name):每个

13、变量具有固定的名称或名字标识l类型(type):每个变量均具有确定的类型,不可更改类型名 变量名表;10C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under what condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matr

14、ix, prove that when satisfy the certain condition, we have 运算符及其优先级优先级运算符1. () 函数调用 - +后缀 后缀2sizeof +前缀 前缀 ! + l赋值语句对左边变量名或等价的数组元素名实施写 操作l右边的表达式结果若与左边的类型不同,则先转换 再赋值,此时可能导致数据精度的损失13C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under wha

15、t condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matrix, prove that when satisfy the certain condition, we have 其他运算符与表达式条件运算符与条件表达式l格式:表达式1 ? 表达式2 : 表达式3l例:x = ( a b ) ? a : b;l上例等价于:if( a b ) x = a; else x = b;逗号运算符与逗号表达式l以

16、逗号连接的表达式l计算过程:从左到右逐个计算各个子表达式 ,结果为最后一个子表达式的值l例:z = ( x = m + n, y = m n, x / y );m= (x, y, z);14C 程序设计基础对于闪光灯,很多人是恐惧的。同时驾驭两三灯,甚至五灯,的确是很难。但是如果仅仅只是一灯的话,问题就简单很多。更何况即便是,一人一灯Changing the inequality into equality under what condition is the current research key point. This paper uses the and its elementary operation corresponds the partitioned matrix, prove that wh

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号