Professional Documents
Culture Documents
Lecture 02
Lecture 02
COMMENTS IN C
PROGRAMMING
S A N D A R U WA N I PAT H I R A G E
B . S C . ( H O N S ) I N M A N A G E M E N T A N D I N F O R M AT I O N T E C H N O L O G Y ( O U K )
C O N S U LTA N T / L E C T U R E R – N I B M
What Is Comment In C Language?
A comment is an explanation or description of the
source code of the program. It helps a developer
explain logic of the code and improves program
readability. At run-time, a comment is ignored by the
compiler.
There are two types of comments in C:
1) A comment that starts with a slash asterisk /* and
finishes with an asterisk slash */ and you can place it
anywhere in your code, on the same line or several
lines.