Home  >  Article  >  Backend Development  >  What are the comment symbols in c language

What are the comment symbols in c language

王林
王林Original
2020-04-06 10:23:3728105browse

What are the comment symbols in c language

Comment characters in C language are generally divided into two types. One starts with "/*", adds the comment content in the middle, and ends with "*/" paragraph comment. Anything between "/*" and "*/" is a comment.

The other is a single-line comment that starts with "//" and is followed by the comment content. Anything after "//" is a comment.

When the program is compiled, the comment content will not be processed in any way. Comments can generally appear anywhere in a program. Comments are used to prompt or explain the function of the program to the user or programmer.

The comment character in C language is a string starting with "/*" and ending with "*/". Anything between "/*" and "*/" is a comment. When the program is compiled, comments are not processed in any way. Comments can appear anywhere in the program. Comments are used to prompt or explain the meaning of a program to the user. In the debugging program, statements that are not used temporarily can also be enclosed in comments so that the translation will be skipped without processing. The comments will be removed after debugging is completed.

In the C language source program, you can use "/*....*/" as the comment character, or you can use "//" as the comment character. Among them, "/*....*/" is a multi-line comment character, and "//" is a single-line comment character. In addition, in C language C90, "//" can also be used as a comment character.

Recommended tutorial: c language tutorial

The above is the detailed content of What are the comment symbols in c language. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn