Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

which of the following is valid advice for naming variables? a. to save…

Question

which of the following is valid advice for naming variables?
a. to save typing, make most variable names one or two letters.
b. to avoid conflict with names that others are using, use unusual or unpronounceable names.
c. to make names easier to read, separate long names by using underscores or capitalization for each new word.
d. to maintain your independence, shun the conventions of your organization.

Explanation:

Brief Explanations

Using underscores or capitalization (e.g., camel - case or snake - case) for multi - word variable names improves readability. Option a makes code hard to understand, option b with unusual names is counter - productive for code readability, and option d goes against good practice of following organizational coding conventions.

Answer:

C. To make names easier to read, separate long names by using underscores or capitalization for each new word.