1. each time a file calls an input/output function, a new ferror () function value is generated. Therefore, the ferror function value should be checked immediately after the input/output function is called, otherwise, the information will be lost.
2. The following two issues must be considered when using temporary files.
<1> ensure that the names of temporary files do not conflict with each other
<2> ensure that the content in the temporary file is not peeked, deleted, or modified by other users.
3. Consider the following when using a directory.
<1> information size. A directory is suitable for storing small amounts of information. You can use pointers to large files.
<2> information type. A directory is usually the property information.
<3> read/write ratio. If you need a large number of write operations, you can select a database.
<4> search capability.
<5> standard access.
4. If the I/O model is complete, the performance can be greatly improved, but I/O still wants to be slow. We recommend that you use multiple threads for some I/O operations. However, multithreading does not increase I/O speed on a large scale.
5. When using the rmdir () function, you must note that this function can only delete empty directories.
6. The DELTREE command deletes all specified directories, whether hidden or read-only.
7. before using the fnmerge () function to create a complete path name, check whether the required drive and directory exist.
8. array subscript always starts from 0. The variables that declare the array are always in lower case. When declaring an array, the variable name must be meaningful.
9. In fact, the C language does not check whether the array is out of bounds. Therefore, you must carefully check the code to check whether the code matches the actual requirements.
10. To save memory space, we recommend that you release useless pointers when writing program code.
11. When operating on arrays, you can use array symbols instead of pointer symbols. This method may increase the program time, but can enhance the readability of the program.
12. a null pointer cannot be referenced indirectly.
13. When using a pointer function, because the return value is an address, the type specifier is generally int.
14. When writing a program, try not to use multi-level pointers, which may reduce the readability of the program.
15. The program structure that is not clearly described in the language can be expressed in diagrams, which makes it easy to understand the meaning of the program.