The C Programming Language的笔记(40)


按有用程度 按页码先后 最新笔记

  • RednaxelaFX

    RednaxelaFX (Script Ahead, Code Behind)

    这就是implicit function declaration的规定啊: If a name that has not been previously declared occurs in an expression and is followed by a left parenthesis, it is declared by context to be a function name, the function is assumed to return an int, and nothing is assumed about its arguments. Furthermore, if a function declaration does not include arguments, as in double atof(); that too ...

    2016-12-20 06:25   1人喜欢

  • southstarj

    southstarj (你丫扯淡)

    这一章的收获很大 be lumped with = put together cryptic = secret, hidden meaning lexicographically a.字典序的 cavalier a.随便的,傲慢的 [note_1] /代码内容已省略/ *t++ <==> *t, t++; [note_2]arithmetics for pointers: best use within one array, otherwise it will go wrong, badly. /代码内容已省略/ [note_3]Multi-dimen...

    2013-01-29 22:18   1人喜欢

  • 小志


    A word of caution: newcomers to C occasionally write = when they mean ==. As we will see in Chapter 2, the result is usually a legal expression, so you will get no warning. 一个好的习惯是把常量放在左边,如 /代码内容已省略/ 这样,当你把`==`误写为`=`的时候,编译器会报错。

    2017-02-04 13:48

  • 小志


    We are now going to consider a family of related programs for processing character data. You will find that many programs are just expanded versions of the prototypes that we discuss here. 字符或者字符串操作算是使用C所能做到的最简单而有趣的事情。因为C当中的字符串并非immutable,所以给了我们可以操作字符串中单个字符的机会,这就可以做一些有趣的算法了。

    2017-02-04 12:24

  • 小志


    We want to get you as quickly as possible to the point where you can write useful programs, and to do that we have to concentrate on the basics: variables and constants, arithmetic, control flow, functions, and the rudiments of input and output. We are intentionally leaving out of this chapter features of C that are important for writing bigger programs. 一本理想的教授编程语言的书就应该以这种方式...

    2017-02-04 10:31

  • SMON


    ## Chapter 2 - Types, Operators and Expressions

    2016-11-09 00:55

  • 孔明

    孔明 (Lifelong Learning)

    typedef的一个重要作用是定义函数指针类型,如下: /代码内容已省略/ 在句中,typedef定义了一个类型PFI,该类型可以定义函数指针,其中函数的返回值为int,参数列表是两个char*。对于PFI的使用如下: /代码内容已省略/

    2015-10-15 21:29

  • 孔明

    孔明 (Lifelong Learning)


    2015-10-15 20:22

  • 孔明

    孔明 (Lifelong Learning)

    果然艺高人胆大! 这个通过命令行输入来查找pattern的程序中非常巧妙了用了“(*++argv)[0]”和“*++argv[0]”两个表达式,其中涉及的知识点:Because [] binds tighter than * and ++, the parentheses are necessary... 在内层while循环中,通过“*++argv[0]”查看了字符串中的每一个字符,使得其支持类似“-nx”的命令形式。

    2015-10-15 17:06

  • Exquisiteness

    Exquisiteness (catyun)

    2.2 Data Types and Sizes The intent is that short and long should provide different lengths of integers where practical; int will normally be the natural size for a particular machine. short is often 16 bits long, and int either 16 or 32 bits. Each compiler is free to choose appropriate sizes for its own hardware, subject only to the the restriction that shorts and ints are at least 16 bits, ...

    2015-02-21 16:46

<前页 1 2 3 4 后页>



The  C Programming Language

>The C Programming Language