TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Wednesday, 6 May 2020

Comments In C Language | Types Of Comments In C Language | Comments In C Language In Hindi

Comments in C Language

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

find iamge of comment in c language | Download image of comment in c language
Fig: Comments In C Language


There are 2 types of comments in the C language.

1.    Single Line Comments

2.    Multi-Line Comments

1.Single Line Comments

Single line comments are represented by double slash \\.

Program of  single line

   #include<stdio.h>    
   int main(){    
    //printing information    
    printf("Hello C");    
    return 0;  
    }      

Output:

Hello C

2.Mult-Line Comments

Multi-Line comments are represented by slash asterisk \* ... *\. It can occupy many lines of code, but it can't be nested.

Syntax:

    /*  
    code 
    to be commented 
     */  

Program  of multi line

#include<stdio.h>    
    int main(){    
    /*printing information   
      Multi-Line Comment*/  
    printf("Hello C");    
   return 0;  
    }       

Output:

Hello C

No comments:

Post a Comment