There are two types of comments in a C+ + program; single line comment and multi-line comment. Single line comment begins with the double slash (/ /) and ends in the same line. We can write a program statement and a comment in the same line. Whatever written after the / / is ignored by the compiler.