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?

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

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

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

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

CompTIA ITF+ FC0-U61
Software Development Concepts
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

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

Bash, the Crucial Exams Chat Bot
AI Bot