C comments

 

  • C uses the same syntax for comments as Java:

      // This is a comment
    
      /* This is a comment */
    

  • The C preprocessor will remove all comments

    (And output all the non-comment text)

DEMO: /home/cs255001/demo/C/1-C-pre/comment.c --- gcc -E comment.c