C Language Tutorial for Beginners #8 Comment Line



C Language Tutorial for Beginners #8 Comment Line

C Language Tutorial for Beginners #8 Comment Line

C Language Tutorial for Beginners #8 Comment Line
In C programming, comments are used to add explanatory notes within your code. Comments are ignored by the compiler and do not affect the functionality of the program. They are used to provide information to other programmers (including your future self) about the purpose and logic of the code. There are two types of comments in C:

Single-Line Comments: These comments are used for adding explanations or notes to a single line of code. They start with two forward slashes (//) and continue until the end of the line.

Multi-Line Comments: These comments can span multiple lines and are enclosed between /* and */. They are used when you want to add comments that extend over several lines.