Search Header Logo
C++ Comments

C++ Comments

Assessment

Presentation

Computers

University

Practice Problem

Hard

Created by

Kittisay SENGTHONG

Used 2+ times

FREE Resource

4 Slides • 2 Questions

1

C++ Comments

Comments can be used to explain C++ code, and to make it more readable. It can also be used to prevent execution when testing alternative code. Comments can be singled-lined or multi-lined.

Slide image

2

C++ Comments

Single-line comments start with two forward slashes (//).


Any text between // and the end of the line is ignored by the compiler (will not be executed).

Slide image

3

Fill in the Blank

ຈົ່ງຂຽນຄຳສັ່ງ Comments ຂອງພາສາ C++

4

C++ Comments

This example uses a single-line comment at the end of a line of code:

Slide image

5

C++ Multi-line Comments

Multi-line comments start with /* and ends with */.


Any text between /* and */ will be ignored by the compiler:

Slide image

6

Fill in the Blank

ຈົ່ງຂຽນຄຳສັ່ງ Comment ແບບຫຼາຍແຖວ

C++ Comments

Comments can be used to explain C++ code, and to make it more readable. It can also be used to prevent execution when testing alternative code. Comments can be singled-lined or multi-lined.

Slide image

Show answer

Auto Play

Slide 1 / 6

SLIDE