Prerequisite – C Language Introduction
C comments explain code and improve readability. These do not affect program execution. You can use comments in C to clarify code and describe algorithms.
There are two types of comments in C: single-line (//) commnets and multi-line (/* */) comments.
1. Single-line comments start with “//” and end at the end of the line.
Example:
//this is a single line comment
2. Multi-line comments start with “/*” and end with “*/”.
Example:
/* This is a multi-line comment Expand multiple lines */
Single-line comments can also be placed at the end of code lines.
Please write comments below if you find anything incorrect. A gentle request to share this topic on your social media profile.