Comments Flashcards

1
Q

Styles of Comments

A

Single line

Multi line comments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Commenting out

A

Converting one or more lines of code into comment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Comment

A

Programmer readable note that is inserted directly into the source code of the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly