Ends in 7 days

BLACK FRIDAY: Receive 83% off Programiz PRO

+🎁 Buy 1 year, gift 1 year FREE — Split with a friend for just $49.50 each

Start FREE trial →
Background Image

Buy 1 year, Gift 1 year —completely FREE

Start FREE trial →
T
last year
Tanzilcountry asked

If the system ignores comments, then why do we need to use them to understand the code when we can understand it without them?

Apekchhya Shrestha
Expert
last year

You can think of comments as helpful notes you leave in your code. They're not run by the compiler, they're just there to make the code easier to understand.

Right now, your code might be simple enough to follow without them, but as programs get more complex, comments become extremely useful, especially when someone else is reviewing your code.

Using comments early on is a great habit! They help you (and others) quickly understand what different parts of the code do, even after a long break.

Hope this helps! Feel free to ask more questions if you're curious.

C++
This question was asked as part of the Learn C++ Basics course.