Haruna
asked

Expert
Kelish Rai answered
I agree that all the names listed in the good and bad variable name examples are valid options for C++ programs.
However, when defining good variable names, the goal is to choose names that are both easy to understand and easy to work with.
For example, it’s much clearer to understand a variable named salary than one named s. Similarly, age is much easier to use and comprehend than something like aGekv2, which doesn’t really convey any meaning.
In short, good variable names should be straightforward, intuitive, and consistent.
C++
This question was asked as part of the Learn C++ Basics course.






