Spam "How programs are developed" -- Chapter A (III) of C programming partner)

Source: Internet
Author: User
ArticleDirectory
    •  
    •  
    •  
    •  
    •  
    •  

 

 

[Sample]

 

 

[Evaluation]

Words are not counted in files, but are not counted after being read into the memory. After the punctuation is erased, the number is not counted. After splitting, the words are saved in the linked list.
To put it simply, we don't need to count the number of words in an article. We need to memorize them first. We can't back them up, but we need to forget punctuation, the words must also be split one by one. After the word is split, it cannot be done. You need to find a word book to record it one by one. A normal notebook cannot be dropped. It must be a one-page notebook that can only record one word. It must also be turned back and forth only,
What kind of "clear programming mind" is required to create such an amazing idea of mine ?!
CodeIn part, 30 is the default magicnumber; _ word starts with "_" and violates the general rules of the C language industry. In fact, identifiers starting with "_" are a style of naming member variables in some C ++ er, which is a pollution to C language. Writing in C code is risky.

 

[Sample]

 

 

[Evaluation]

Well. You also need to paste this lame book and article together.
AllProgramEveryone knows that demand change is a crazy event. If not all of the previous work had been voided, it would have been at least a heavy hit, and the sound design and code had suddenly become a problem everywhere.
There is no requirement change here. Instead, you can write code and modify the design (Extended txtfile structure ). There are two possible possibilities: 1. self-abuse; 2. Countless in advance, writing code like a headless fly. I can't write any more, so I can try to modify the data structure temporarily. This is an extraordinary way of working.

 

[Sample]

 

 

[Evaluation]

Well, the number of times a word appears is also recorded on each page of the word base. However, the requirement for the problem is to calculate the word frequency of a keyword. Therefore, you only need to find the number of occurrences of the keyword and the total number of words to complete the requirement. Calculate the number of times all words appear. Is it because the computer calculation is too fast or the brain enters the water?

 

[Sample]

 

 

[Evaluation]

In the end, MVPs dare to "design and construct" and thoroughly subvert the basic principles of software engineering.
In actual work, many people have done similar dirty work out of various helplessness. But dare to make it public in the book is completely another matter.
"Not only can we get each word, but also the number of each word and the total number of words in the file ". Well, smart and efficient! In order to solve the hunger problem, we can not only eat food but also give it to the toilet by the way, although we do not need to go to the toilet.

[Sample]

 

 

[Evaluation]

The notebook is pasted one page at a time. Every page written must be pasted after the last page of the notebook. No paper (malloc () call returns NULL) What should I do? Write a page (strcpy (node-> text, text )). He doesn't care where he writes it.
In fact, "the newly added node must be the end node of the linked list", and adding the new node to the end of the linked list can only be said to be irrational paranoia. Because this method has no benefit in addition to having trouble for myself, it also shows that the author does not know how to use the linked list. The advantage of a linked list is to add or delete nodes in the header, which is especially suitable for describing Filo.

[Sample]

 

 

[Evaluation]

Thank God! This time I finally failed to use "more effective searchAlgorithm-- Half-lookup algorithm ". It is estimated that after the last time I used it, I had to worry about this" more effective lookup algorithm.
The node variable is redundant.

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.