导航

随笔分类 -  Unix&C

摘要:C通过运行时堆栈支持递归函数的实现。递归函数就是直接或间接调用自身的函数。 许多教科书都把计算机阶乘和菲波那契数列用来说明递归,非常不幸我们可爱的著名的老潭老师的《C语言程序设计》一书中就是从阶乘的计算开始的函数递归。导致读过这本经书的同学们,看到阶乘计算第一个想法就是递归。但是在阶乘的计算里,递归 阅读全文

posted @ 2008-09-12 10:43 ·小新· 阅读(71337) 评论(21) 推荐(15)

摘要:3.3. open Function open 函数 A file is opened or created by calling the open function. 打开或创建一个文件调用open函数 open#include int open(const char *pathname, int oflag, ... /* mode_t mode... 阅读全文

posted @ 2008-09-10 16:41 ·小新· 阅读(658) 评论(0) 推荐(0)

摘要:3.1 Introduction 介绍 We'll start our discussion of the UNIX System by describing the functions available for file I/Oopen a file, read a file, write a file, and so on.Mos... 阅读全文

posted @ 2008-09-10 12:01 ·小新· 阅读(365) 评论(0) 推荐(0)