There are two kinds in C , namely / * * / and //; below I explain it from basic usage, role, and importance.
(1) / * * / is inherited from C, because it is really easy to use, it can span multiple rows, and can be placed in any location, but we are used to the explanation of the text to A. , Enhance the readability of the code. You can often see many of the programmers to do this:
/ * ----------------
* My program
* It is about ........
* ------------------
* ------------------
* /
But remember, this is just clearer. In fact, when the compiler is compiled, the comment will be deleted from the code, and all characters between / * * / all the characters are seen as characters without being displayed. That is to say, the length of the comment does not increase the length of the code, but instead makes the meaning of the code more clear.
In addition, it is important to pay attention to / * * / if it is not nest, that is, it can't appear / * /*..*/ * /, then the compiler will give an error prompt, and the solution is to put it / * * / Change to / * * / This compiler can be processed normally.
(2) Double slash // annotation. This is a very common note in C . It has a lot of flexibility, because sometimes we don't have to use / * * / so complicated, // can be treated and used everywhere. // is also called a row of comments, and the end of the line will be considered as a comment from //. It is convenient to explain the specific code!
Note in C is very simple, but now the problem is that many people don't have patient writing, it seems to be omitted, this is why there are many so-called programmers write something, I don't understand, think about this. How to go to teamwork, how to create a big project. Although this is a small thing, the end impact is huge, it is worth each of our people!