Posts
Showing posts from November, 2018
- Get link
- X
- Other Apps
· We define a variable by stating its type, followed by one or more spaces, followed by the variable name and a semicolon. E.g.: bool IsOK · The variable name can be virtually any combination of letters, but it cannot contain spaces. · Legal variable names include j, i245abcd, and mySalary. · Good variable names tell us what the variables are for; using good names makes it easier to understand the flow of the program. The following statement defines an integer variable called int mySalary: · Many programmers prefer to use all lowercase letters for their variable names. If the name requires two words (for example, my car), two popular conventions are used: MyCar, myCar. The latter form is called camel notation because the c...