DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C language compilers

Comments

Comments begin with the characters /* and end with the next */.

   /* this is a comment */
Comments do not nest.

If a comment appears to begin within a string literal or character constant, it will be taken as part of the literal or constant, as specified by the phases of translation.

   char *p = "/* this is not a comment */"; /* but this is */
In addition, //-style comments are accepted.
Next topic: Preprocessing
Previous topic: Wide string literals

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004