Reading Notes for mad man C (1)

Source: Internet
Author: User

The prototype of page8 and main does not require void as the parameter. I tested codeblock (using gcc as the compiler) and there is no exception.

 

In additionCodeThe travel number should be marked and the line number should be used to indicate more clearly.

 

Another format problem is: ";" all Chinese characters appear in the book alone ";" this is very bad and easy to misunderstand.

 

Another problem is c99 or c89. My suggestion is to introduce c89, which is complicated with c99, but c89 should not be described as "outdated". I think c89 is more mainstream.

 

Page9, for the difference between # include "" And # include <>, it is better to point out the chapters that will be discussed later.

 

Page14, the explanation of identifiers, variable names, and function names in Chinese is confusing. In fact, I think it is best not to start to touch this aspect as a book for beginners. You can add some instructions later.

 

Page16, as shown in Table 1-1, it should be said that "some keyword" is the new keyword of c99. In addition, I think this c99 is of little significance, but it is confusing to say so. You can add a description in the appendix below.

 

Page19: style habits. It's too simple to say more details. In addition, the Code style of mad man c is the least common among the three ({}) styles. We should mention three different styles.

 

Page20, the first section describes how to divide printf into print \ line feed and F, which is unnecessary and confusing, and the sample code is still wrong if it is indented.

 

Page20, I think it should be "any cProgramThere must be only one entry function, which is defined as main in most cases. "Both VC ++ and GCC can use the compilation option to modify the entry function. If VC ++ is used, the name is usually _ tmain (). And there are two main functions, right? If you want to raise the bar, you can define two main items by predefining the compilation options.

 

The page20 and printf () functions are provided by the C standard library, while the C standard library is mostly provided by the operating system writers. Normally, GCC only takes the printf () it is linked together with the standard library code implementation and compilation. For the standard library, you can also choose a third party such as dietc. The Windows SDK also provides the implementation of the standard library. I am not very clear about it, but theoretically, GCC should be able to use the include and library provided by the Windows SDK.

 

For page25, we should introduce the complete form of the words D (ecimal) and H (Ex), which is better.

 

Page29, for study, examination, interview, I think "the same name" is a very worthwhile knowledge point, of course, do not write this in actual work.

 

Page31, due to the font,/**/and // look very strange, especially //, as if there is a space in the middle.

 

Page31, I do not agree to the comment. I personally think that annotations should only be used in this case. The two books about how to annotate and when to annotate, code Daquan and program design practices are very comprehensive.

 

Page32, the definition of variables, in fact, the English version of K & R (K & R refer to the English version of the page number) page195 is very clear, the concept of crazy man C only describes one aspect, that is, the storage object aspect. Incomplete.

 

Page32, the variable must be declared before it is used (Declaration). This is a false statement in mad man C. For C, declaration and definition) there are two very different things. They cannot be used interchangeably. K & R page40 is very clear. Definition is described in the page250 of K & R.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.