C comments style - By E3 School

You have learned completely 3 tutorial. So start 4 Tutorial. In this tutorial, cover-up adds comments in c

Learn this :

  • Why Use Comments in C?
  • How many Types of Comments?
  • What is the benefit add comments?

C comments style - By E3 School

Why Use comments in C?

Comment can be used to explain C++ code and to make it more readable comments can be singled line and multiple lines.

 What is the benefit add comments?

Comments are textual content notes brought to the software to offer explanatory records about the supply code. They are utilized in a programming language to document the software and remind programmers of what complicated matters they simply did with the code and additionally helps the later technology for expertise and renovation of code.

Type Of Comments  :

Two types of comments 
  1. Single line comment  "//"
  2. Multi line Comments "/* ----------*/"
1.Single line Comments "//"
Start with // Continue until the end of the line.

 For Example :

  1. #include<iostream>
  2. using namespace std;
  3. main()
  4. {
  5. //This is comment add
  6. //Explain the code 
  7. count<<"Hello World"<<endl;
  8. return 0;

Multiline Comments:

Start with /* ------------*/ end multiline comments.Show that Example
  1. For Example
  2. #include<iostream>
  3. using namespace std;
  4. main()
  5. {
  6. /*write any text between 
  7. any comment add for example this 
  8. line Hello world
  9. */
  10. count<<"Hello World !"
  11. return 0;
  12. }

Topic :


Bill Gates :

If you can't make it good, at least make it look good.



Post a Comment

Virtually nothing is impossible in this world if you just put your mind to it and maintain a
positive attitude.

Previous Post Next Post