answersLogoWhite

0

Unless a language has strict rules regarding naming conventions, how we name our variables is really a matter of personal style. In C and C++ we generally prefer all lowercase with underscores separating each word as this helps readability and retains consistency with standard library conventions. Using a leading capital typically denotes something of importance, but is usually applied to a user-defined type rather than to a variable. Uppercase names are generally avoided because macros are conventionally named using all uppercase so they stand out. Other languages have other conventions, but a leading capital typically has no real meaning unless it is dictated by some language rule.

User Avatar

Wiki User

8y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
ReneRene
Change my mind. I dare you.
Chat with Rene

Add your answer:

Earn +20 pts
Q: Why are some variables capitalized?
Write your answer...
Submit
Still have questions?
magnify glass
imp