Comments on C Program

06-11-17 Course- C

Comments in C language are used to provide information about lines of code. It is widely used for documenting code. There are 2 types of comments in C language.

  • Single Line Comments
  • Multi Line Comments
  • Single Line Comments

Single line comments are represented by double slash \\. Let's see an example of single line comment in C.


 
#include <stdio.h>      
#include <conio.h>    
void main(){      
clrscr();      
//printing information  
printf("Hello C");  
getch();      
}