QP School
Nested multi-line comments in C - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: C 18 Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=32)
+--- Thread: Nested multi-line comments in C (/showthread.php?tid=5132)



Nested multi-line comments in C - Qomplainerz - 07-26-2023

Example:

/*
    This is the outer comment.
    /* This is a nested comment. */
    It is ignored as well.
*/

Explanation:

C allows nesting of multi-line comments.
In this example, an inner multi-line comment /* This is a nested comment. */ is placed within the outer comment.
The compiler ignores both the outer and inner comments.