Free CompTIA ITF+ FC0-U61 Practice Question

In a payroll application, there is a need to represent the number of weeks in a year, which will not change over the course of the program. How should this be represented in the program to ensure the value remains unchanged?

  • Use a variable that is set to 52 at the beginning of the program and change it as needed.

  • Declare a constant with an appropriate name and assign the value 52 to it.

  • The number of weeks in a year should be input by the user each time the program is run.

  • Hardcode the number 52 wherever it is needed in the program without assigning it to a named constant.

This question's topic:
CompTIA ITF+ FC0-U61 / 
Software Development Concepts
Your Score:

Check or uncheck an objective to set which questions you will receive.