CompTIA Study Materials
AWS Study Materials
AWS Cloud Practitioner AWS Cloud Practitioner
AWS Cloud Practitioner CLF-C02
Microsoft Study Materials
Microsoft Azure Fundamentals Microsoft Azure Fundamentals
Microsoft Azure Fundamentals AZ-900

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?

  • 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.

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

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

This question is for objective:
Software Development Concepts
Your Score:
Software Development Concepts
Infrastructure
Applications and Software
Database Fundamentals
Security
IT Concepts and Terminology