Comments in C
For Complete YouTube Video: Click Here
In this class, we will understand Comments in C.
The comment plays a vital role in writing ‘big’ programs.
The comments are given in the program to help the third person understand what’s happening in the program.
Table of Contents
Comments in C
Comments clarify the C source code, allowing others to understand better what the code was for and greatly help debug the code.
We can comment in two different ways.
- Multi-line comments
- Single-Line Comments
Multi-line and Single-line Comments
The image below is a program that illustrates multi-line and single-line comments.
The syntax for multi-line comment is /* comment here */.
Usually, multi-line comments are to elaborate a function.
The syntax for single-line comments is two forward slashes. //Comment Here.