吴裕雄--天生自然C语言开发:判断
摘要:if(boolean_expression) { /* 如果布尔表达式为真将执行的语句 */ } #include int main () { /* 局部变量定义 */ int a = 10; /* 使用 if 语句检查布尔条件 */ if( a int main () { /* 局部变量定义 */ int a = 100; ...
阅读全文
吴裕雄--天生自然C语言开发:运算符
摘要:#include int main() { int a = 21; int b = 10; int c ; c = a + b; printf("Line 1 - c 的值是 %d\n", c ); c = a - b; printf("Line 2 - c 的值是 %d\n", c ); c = a * b; printf("Li...
阅读全文
吴裕雄--天生自然C语言开发:存储类
摘要:{ int mount; auto int month; } { register int miles; } #include /* 函数声明 */ void func1(void); static int count=10; /* 全局变量 - static 是默认的 */ int main() { while (count--) {...
阅读全文
吴裕雄--天生自然C语言开发:数据类型
摘要:#include #include int main() { printf("int 存储大小 : %lu \n", sizeof(int)); return 0; } #include #include int main() { printf("float 存储最大字节数 : %d \n", sizeof(float)); printf("f...
阅读全文