Home  >  Article  >  Backend Development  >  What is the comment delimiter in C language?

What is the comment delimiter in C language?

angryTom
angryTomOriginal
2020-02-12 17:49:3218203browse

What is the comment delimiter in C language?

What is the comment delimiter in C language

1. The earliest C language comment is: /* */

2. Line comments added later: //

where /**/ is a multi-line comment and // is a single-line comment.

It should be noted that C language comments cannot appear anywhere in C language code.

For example, the following comment is wrong:

in/*…*/t i;

Because the compiler will replace the comment with a space, the replaced statement is not a C statement, so an error will occur.

Recommended learning: c language video tutorial

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