Home Python C Language C ++ HTML 5 CSS Javascript Java Kotlin SQL DJango Bootstrap React.js R C# PHP ASP.Net Numpy Dart Pandas Digital Marketing

Comments:

In C, you can add comments to your code to make it more readable and understandable. Comments are ignored by the compiler and are meant for human readers. There are two types of comments in C:

1. Single-line comments: These comments span only one line and start with //.

// This is a single-line comment int num = 10; // This is also a single-line comment

2. Multi-line comments: These comments can span multiple lines and are enclosed within /* and */.

/* This is a multi-line comment. It can span multiple lines. */ int sum = 0; /* This is also a multi-line comment */

Comments are useful for explaining the purpose of code, documenting complex algorithms, providing reminders for future modifications, etc. It's good practice to add comments to your code to improve its maintainability and readability.



Advertisement





Q3 Schools : India


Online Complier

HTML 5

Python

java

C++

C

JavaScript

Website Development

HTML

CSS

JavaScript

Python

SQL

Campus Learning

C

C#

java