Comments in c | How To Write Comments in C Language

Comments in c | How To Write Comments in C Language


Comments in c – “C Programming Me Comments” Bahut Important hoti hai understanding purpose ke liye.write a comments, kese likhte hai ye ham is post me example comments in c , ke sath dekhte hai.How Many type of comments |

Comments in c

What is Comments

Comments is very important think becoz comments likh ne se ham aapne program ko understand karte hai. C language me comments ke bhi koi style hai likh ne ke. Lekin ham all type comments in c ke bare me jante hai |

How many types of comments are there in C?

Comments in c | How To Write Comments in C Language
Comments In C

Two types comments are there in c programming language.

  1. Slash Asterisk /*
  2. Double Slash //

write a comments

comment starts with a slash asterisk /* and ends with a asterisk slash */

Slash Asterisk Comments

Example :

/* slash asterisk ke under bhi comments likh sakte hai /*

/* slash asterisk use karke ek se jyada line 
me comments likh sakte hai /*

printf("Hello World");     /* print hello world /*

Aap Dekh Sakte hai hamne ye upper code box me example jo program write hai kiya usme hamne slash asterisk /* comments ko use kiya hai issi tarah se aap ek se jyada line me comments write kar sakte hai |

Structure in C Language | Basic structure in c example

example comments in c

Double Slash // Comments

C programming language me double slash // comments sabse jyada use hone wali comments hai for example agar hame ek line me koi comments write karni ho to ham keval double slash // comments use karte hai. Iska ham ek example ke sath understand karte hai |

Example :-

// double slash comments 

printf("Hello world");     // print hello world

Aap dekh sakte hai ki hamne double slash comments ko use karke example me comments write kiya issi tarah se ham log kitni bhi comments write kar sakte hai |

Example – Comment Spans Multiple Lines

You can create a comment that spans multiple lines. For example:

* Author:  
* Purpose: To show a comment that spans multiple lines.  
* Language:  C  

Example Comments

Dosto mujhe ummed hai ki aap Comments in C Language ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Leave a Reply

Your email address will not be published. Required fields are marked *