Comments and Introduction to Compiler

  • Comment:In Programming,Comments are the statement which is used for explanation or annotation in the source code of a computer program.This statement are ignored by compiler and interpreter.The purpose of using Comment in  program is explaining the code in normal language like English,it is also beneficial for programmers  because after a certain time if programmer look at his code then it would be difficult to understand without comment hence,We use comment.
  • Types of Comment:           
   1.Single line comment:This is a Single line comment it is used to comment only one statement.//(2 forward slash) is used for single line comment.

Eg:  

int b;//declaring variable

In above eg,We declared variable b and put comment by using // .So all the statement on the same line  after // will be ignored.

  2.multi-line comment:It is used when we want to comment multiple statement./*  */(forward slash *  * forward slash) is used for multi-line comment.In multi-line all the statement inside the  /*   */ will be ignored.

/* 

Author:Pankaj Jaiswal

    Date:12/1/2021

*/

int a=4;

int b=5;

  •  Compiler:In Computing,Compiler is a program which is used to convert high level language program(C,C++,Java etc) in low language(Machine code)program.We convert the program in machine language because computer does not understand high level language(C,C++,Java) program.Machine language is also called as binary language(1 and 0 language). 
           
 

If you any have doubt,suggestion regarding this post or website then feel free to share with us.
 
If you have learned something new from this post then share this post with your family and
friends.
 
Happy Learning :)😎   


Previous Next

3 Comments

  1. Video learning is a tremendously popular trend that is facilitating effective learning. There are many video designers budding in the e-learning industry who promise to design interactive videos. Acadecraft is celebrated for its 2d and 3d animated videos services 2D and 3D animated videos services. Our videos are curated by qualified experts who make a perfect blend of technology and knowledge at feasible rates.

    ReplyDelete
  2. Video learning is a tremendously popular trend that is facilitating effective learning. There are many video designers budding in the e-learning industry who promise to design interactive videos. Acadecraft is celebrated for its 2d and 3d animated videos services 2D and 3D animated videos services. Our videos are curated by qualified experts who make a perfect blend of technology and knowledge at feasible rates.

    ReplyDelete
Previous Post Next Post