Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
Introduction to C
History of C Language
C Variables
Variables Types in C
C Identifiers
C Operators
C Comments
ASCII Value C
Constants C
Features of C
Install C Language
Start C Program
Compilation in c
printf() and scanf()
C Data Types
C Keyword
Format Specifier C
Format Specifier part2
Escape Sequence C
Tokens in C
Boolean in C
What are literals?
 


  

 
C Comments
Question Posted on 19 Aug 2020

Home >> Tutorial >> C Language >> C Comments


C Comments
Comments are used to provide some information about lines of code. Which helps developer to understand later on why this code is written or do some other information bind with that code. Or in another language we can say that it is widely used for documenting code. There are 2 types of comments in C language.
(1)Single Line Comments
(2)Multi-Line Comments

(1)Single Line Comments

Here in Single Line Comments which is represented by double slash \\. In below example we have given example for single line comments.


C Single Comments
Output:-
Hello Welcome

Here in above code we can also add comments in single line with code too as given below


C Comments Code

(2)Multi Line Comments

Here we will write multi line comments which is represented by slash asterisk \* ..... *\. Here this will occupy many lines of code. But it will not have nested syntax.


MultiLine Comments
Output:-
Hello Welcome





Other Important Questions
Features of C
Introduction to C
History of C Language
Install C Language
C Variables







 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |