Comments in C
Comments are used to make code more understandable by explaining what different parts of the program do. They are ignored by the compiler and do not affect program execution. C supports two types of comments:
a. Single-line Comments
Begin with two forward slashes. Anything following // on the same line is treated as a comment.
b. Multi-line Comments
Start with /* and end with */. Anything in between is treated as a comment and can span multiple lines.
Using comments effectively is a good programming practice that improves code readability and maintainability.