Comments Flashcards
1
Q
Styles of Comments
A
Single line
Multi line comments
2
Q
Uses for comments
A
- for given library, program or function
- to describe what the library, program, function does
- to describe how the code will accomplish the goal
- do describe why the code is doing something
- as reminder for made decision
- to clarify what the code does to others
3
Q
Commenting out
A
Converting one or more lines of code into comment
4
Q
Reasons for commenting out
A
- the code you work on needs to be run but it is not ready to compile
- you dont have time to fix a code that doesnt work
- to find source of error
- to replace a piece of code with another
5
Q
Comment
A
Programmer readable note that is inserted directly into the source code of the program