The C Programming Language的笔记(45)

>我来写笔记

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

  • southstarj

    southstarj (你丫扯淡)

    这一章的收获很大 be lumped with = put together cryptic = secret, hidden meaning lexicographically a.字典序的 cavalier a.随便的,傲慢的 [note_1] (*px)++; // 表示px指向的数加1 *px++; // 表示px的下一个地址(数组的下一个元素)的值 *t++ <==> *t, t++; [note_2]arithmetics for pointers: best use within one array, otherwise it will go wrong, badly. type *p; p+n; /* n = 1 for char(8bt), 2 for i...

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

  • 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 is taken...

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

  • yogi

    yogi

    pdf: [http://www2.cs.uregina.ca/~hilder/cs833/Other%20Reference%20Materials/The%20C%20Programming%20Language.pdf]

    2019-12-18 12:19

  • 夏夜寂寞轻注销

    夏夜寂寞轻注销 (有事烧纸)

    If one is sure that the elements exist, it is also possible to index backwards in an array; p[-1], p[-2], and so on are syntactically legal, and refer to the elements that immediately precede p[0]. 不保证所有运行环境都允许此类行为。在mac终端上,这种逆向读取array元素的行为会产生警报,而且会出现预料之外的结果。 warning: array index -1 is before the beginning of the array[-Warray-bounds]   (1回应)

    2019-09-18 16:37

  • 夏夜寂寞轻注销

    夏夜寂寞轻注销 (有事烧纸)

    注意,如今库已经支持API getline(&buffer,&size,stdin),运行书中所给代码会因为已存在原生API和arguments个数不符而报错。改动书中getline的函数名称即可解决这个问题。

    2019-09-10 17:12

  • 夏夜寂寞轻注销

    夏夜寂寞轻注销 (有事烧纸)

    虽然负数转二进制的应用并不常见,但还是补充一下。负数的二进制表示用此公式:-x = ~x + 1,即(1)求对应正数的二进制表示->求(1)的补码->(2)的结果加1。 e.g. 3的二进制表示是00000011->~3为11111100->~3+1为11111101,即-3的二进制表示。 关于此思路,有一篇内容更完整的博文:[https://blog.csdn.net/github_39363510/article/details/77160829] 另外一种理解有些tricky,即-n的二进制表示与~(n-1)等同。 P.S. -...

    2019-09-09 16:08

  • 夏夜寂寞轻注销

    夏夜寂寞轻注销 (有事烧纸)

    As an specific example, on the UNIX operating system you must create the program in a file whose name ends in ".c", such as hello.c, then compile it with the command cc hello.c If you haven't botched anyting, such as omitting a character or misspelling something, the compilation will proceed silently, and make an executable file called a.out. If you run a.out by typing the command a.out it will...   (1回应)

    2019-09-08 09:49

  • 小志

    小志

    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. 一个好的习惯是把常量放在左边,如 if ('\n' == c) 这样,当你把`==`误写为`=`的时候,编译器会报错。

    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

<前页 1 2 3 4 5 后页>

笔记是你写在书页留白边上的内容;是你阅读中的批注、摘抄及随感。

笔记必须是自己所写,不欢迎转载。摘抄原文的部分应该进行特殊标明。

The  C Programming Language

>The C Programming Language