C程序设计第七章函数.ppt

C程序设计第七章函数

Chapter 7 - Functions 7.1 Introduction Divide and Conquer ——分而治之 Construct a program from smaller pieces or components Each piece more manageable than the original program 函数是一段完成特定任务的程序。 模块化程序设计 基本思想:将一个大的程序按功能分割成一些小模块 特点: 各模块相对独立、功能单一、结构清晰、接口简单 控制了程序设计的复杂性 提高元件的可靠性 缩短开发周期 避免程序开发的重复劳动 易于维护和功能扩充 开发方法: 自上向下,逐步分解,分而治之 7.2 Program Modules in C Functions Modules in C Programs written by combining user-defined functions with library functions C standard library has a wide variety of functions Makes programmers job easier - avoid reinventing the wheel 7.2 Program Modules in C (II) Function calls——

文档评论(0)

1亿VIP精品文档

相关文档