Archive for the ‘C’ Category

[C] gcc

2009.6 3

最简单的helloword程序: 8d47dd55f6474617ecbe138f51cf3c57000 我们编译运行: #gcc -Wall -o helloword hello.c #./helloword #hello world 通常说的“编译”的过程包括: 1:预处理(pre—process)。从c语言文件生成预处理后的c语言文件。预处理的过程一 Read the rest of this entry

[C] C语言的基本数据类型

2009.6 3

整型: char类型,1 byte。 标准ASCII表的范围:0-127. unsigned char 范围:0-255 signed char 范围:-128-127 除了char 还有short int (简称short),int,long int(简称long),long long int(简称 long long),这些类型都可以加上signed或unsigned关键字表 Read the rest of this entry

[C] 不能企图通过改变指针形参的值而使指针实参的值改变

2009.5 26

这句话一直困扰我这很久。不过最近通过gdb终于明白了。 形参就是函数定义与函数说明时带的参数。而实参就是函数调用时给的参数。形参出现在函数定义中,在整个函数体内都可以使用,离开该函数则不能使用。实参出现在 Read the rest of this entry