Comment in C++

Comment in C++

Comments can be used to explain C++ code and Comments are portions of the code ignored by the compiler which allow the user to make simple notes in the relevant areas of the source code.

Comment in C++


Table of Contents
  1. Types of comment:-
    1. Single line comment:-
    2.  Multiple line comment:-
  2. Data science & data analyst
  3. Data Cleaning and Preprocessing in Data ScienceAdvanced Data Analysis Techniques: Unlocking Insights from DataData Visualization Techniques in Data ScienceDescriptive Statistics in Data SciData Science Tools and TechniquesScope of Data ScienceWhy learn Data Science? | Why Data Science?Impact of Data ScienceThe Importance of Data in Science | Introduction to Data ScienceWhat is Data Analysis | Data Analyst for Beginners
    1. C++
  4. Introduction of C++ || Definition of C++Brief history of C++ || history of C++Features of C++ || why we use C++ || concept of C++Concept of OOP || What is OOP || Object oriented programming languageDifference Between OOP And POP || Different Between C and C++Characteristics of C++Interesting fact about C++ || Top 10 interesting fact about C++C++ Program StructureWriting first program in C++ || how to write hello world in C++Basic Data Type And Variable In C++Identifier in C++Keywords in C++Token in C++Comment in C++Constant in C++Modifier in C++Taking User Input in C++ | User input in C++Input Output Operator In C++C++ Operators | Operator in programming languageHow to Add two number in C++Polymorphism in C++Compile Time Polymorphism in C++Function overloading in C++Operator Overloading in C++What are Control Structures in C++ || Understanding Control Structures in C++ | How to use if, else, switchWhat are Functions and Recursion in C++ | How to Defining and Calling FunctionsClass in C++Object in C++
    1. Algorithms
  5. Why algorithm | The Importance of Algorithms in Modern Technology
    1. Technology
  6. Which is better | BSc in Computer Science or BTech?

We can use comment in many type in a program for ex:- we can explain the program by single line comment , we can declare the function() work in a program and etc.

Types of comment:-

In a C++/C comments are two types:-

1.    Single line comment

2.    Multiple line comment

Single line comment:-

 Singe line comment start with // and continue until the end of the line. If the last character in a comment line is a \ the comment will continue in the next line.

#include <iostream.h>

#include <conio.h>

 

Void main() {

 

Cout<<”this is a simple program”;   

// comment here 

 

}

 

 Multiple line comment:-

Multiple line comment start with /* and end with */

#include <iostream.h>

#include <conio.h>

 

Void main() {

 

Cout<<”this is a simple program”; 

 

 /* this

Is multiple

Line comment  */

 

}



Data science & data analyst

C++

Algorithms

Technology


Post a Comment

Ask any query by comments

Previous Post Next Post