How to Make a Comment in C++ Program

There are two types of comments in C++, double slash comments and slash star comment. The double slash comment cover one line for comment and compiler ignore that line while slash star comments cover number of line or block of lines.

Source Code

#include<iostream>
using namespace std;
int main ()
 {
   cout<<" \t \t \t LEP Tutorials \n \n \n  ";
   cout<<" \t \t Types of comments in C++ \n \n  ";
   cout<<"  1. Double Slash (//) Comments \n \n ";
   cout<<"   2. Slash Star (/*) Comments \n \n ";
   // This is double slash comment which follow just a single line
   /* This is star slash
   comment which follow the set of line */
   cout<<" \t \t \t \t \t www.ancodinfpoint.com \n";
 }

Output of the Program

How to make a Comment in C++ program

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment