CMPSC 16 Chapter Notes - Chapter 2: Backslash, Boolean Expression, Whitespace Character
Document Summary
Variables can hold a number or data of other types. Guaranteed to have some value in it even if it is a garbage value left by some previously-run program. Value: the number or other type of data held in a variable. Compiler assigns a memory location to each variable name in the program; value of the variable is kept in the memory location assigned to that variable; value of the variable is in 0s and 1s. Identifier: name of a variable or any other item in a program. Use meaningful names that describe its function in the program. Must start with either a letter or an underscore and all the other characters must be either letters, digits, or the underscore. C++ is case-sensitive: distinguishes between uppercase and lowercase letters in the spelling of identifiers. Keywords (reserved words): special class of identifiers that have a predefined meaning and that cannot be used as names for variables or anything else.