(1) Build software quality in software design process.
(2) Code Quality assurance Priority principle:
① correctness, refers to the program to achieve the design requirements of the function.
② stability, security, refers to the program stability, reliability, security.
③ testability, refers to the program to have a good testability.
④ specification/readability, refers to the program writing style, naming rules, etc. to conform to the norms.
(3) Only refer to their own storage space. If the module package is good, then the illegal reference to other people's space generally does not occur.
(3) Prevent references to memory space that has already been freed. In the actual programming process, a little careless will appear in a module to release a block of memory (such as the C language pointer), and another module at some point in the subsequent use of it. To prevent this from happening.
(4) The memory allocated in the procedure/function is disposed before the procedure/function exits, and the file handle requested in the procedure/function (for opening the file) is closed before the procedure/function exits. The allocated memory is not freed and the file handle is not closed, which is a more common error and may occur with little attention.
(5) Do not misuse the goto statement. A goto statement destroys the structure of a program, so it is best not to use a goto statement unless you really need it.
C Language Programming Specification--------9 Quality Assurance