Programming Concepts

Check your understanding - Comments

What are comments for?

It would be unusual to comment every line in a program. If good variable and constant names are used, the code is usually self-explanatory.
No, comments are ignored by the program.
When a program is being tested and debugged, a programmer will sometimes comment out lines of the program to help determine where the bug is. However, this is not the main purpose of comments.
Yes. Comments put the code they relate to into the context of the aim of the program, by describing what the code does rather than how it does it.
← Previous 1 2 3 4 5 6 7 8 9 10 11 12 Next →