QP School

Full Version: Multi-line comments in C
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Description:

In C, multi-line comments (also known as block comments) allow you to add comments that span multiple lines. Multi-line comments begin with /* and end with */. Anything between /* and */ is considered a comment and is ignored by the compiler.

Example:

/*
    This is a multi-line comment.
    It can span multiple lines and is ignored by the compiler.
    It is used for adding detailed explanations or large comment blocks.
*/

Explanation:

In this example, the multi-line comment starts with /*.
The comment content can span multiple lines.
The comment is terminated with */.
Anything between /* and */ is considered a comment and is not processed by the compiler.