C is a very classic language. If you want to do well in the software industry, you must learn it.
Introduction
First, there are many different C and Pascal (Object Pascal), such as C cannot define functions within the function, which is not used to it at Pascal's programmers. There are also some such as the equal sign, assignment number, and so on. Overall, C feels a lot more simply than Pascal when writing.
Comparison with C # and Java: Why is you putting C # and Java, because overall, but from grammar, C # and Java are still very similar, except for some individual places. People from C # and Java transfer to people should pay attention to the use of C pointers, and C is not a complete object-oriented, there are many ways, such as the starting main function is a separate one. The process is not packaged in the class.
Each part
In the process of learning, after I found an effective study, I didn't remember how much code I didn't read how good procedures. I think this is not necessary. The most important thing is that you have learned. How should the door language use, in what circumstances, in what statement, what sentences are used, this is the focus of learning, and other things such as grammar can be checked during programming. So I want to put the understanding of my usage and share it with everyone, I hope to help everyone.
1. Function: The function is known, but what kind of situation should be used to do it? First, if some of the same or different statement blocks are repeated, it is necessary to package it in a function, so the benefit is obvious, can reduce the amount of code, and more important is convenient for maintenance, Changing a place can change all places. If the inline function or macro is considered in consideration of performance, it is recommended to use the inline function. Second, it is possible to independently as a part, it should be independent, which can improve the reading of the code and facilitate maintenance. Once again, some functions that may be replaced during the encoding process, I usually put the code code independently, so that I will not be wrong because of the wrong line when I have a line.
2. Function overload This is a very useful function. Like the function function, just the type of individual parameters or a number of different numbers, you can use the function overload, so you can save a function. However, if the internal code is the same, only individual places are not only the same, can consider mergen with these functions, and add a parameter to determine which type, which can save a part of the code. In addition, the overload of the constructor provides a variety of initialization methods, and it is recommended to use it.