Home>Article>Backend Development> What is the multi-line comment symbol in C language?

What is the multi-line comment symbol in C language?

藏色散人
藏色散人 Original
2020-04-14 10:41:09 22207browse

What is the multi-line comment symbol in C language?

#What are the multi-line comment symbols in C language?

The multi-line comment symbol in C language is "/* */"

There are two types of comments in C language:

1. Single line Comment:

Syntax:

//The content of the comment

Function:

//The content of the line to the right of the symbol is ignored by the compiler (press return Car is considered a line break)

Shortcut key: Command / Execute uncomment again

Recommended tutorial: "c Language Tutorial"

2. Multiple lines Comment:

Syntax:

/* Content of comment */

or

/*

Content of comment

*/

Function:

/* */All content in the symbol is ignored by the compiler

Use a single line comment when interpreting a certain statement

Use multi-line comments when explaining a program

Note:

Single-line comments can be nested

What is the multi-line comment symbol in C language?

Multi-line comments cannot be nested, and an error will be reported!

What is the multi-line comment symbol in C language?

The above is the detailed content of What is the multi-line comment symbol 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