M3S2 Part 1 Flashcards
elements of c++
- character set
- keywords
- data types
- Identifiers
- Operators
Characters that can be used in a program are:
- Lowercase letters (a-z)
- Uppercase letters (A-Z)
- Digits (0-9)
- Special Characters (+,-,*,/,=,(,),{,}……)
reserved words with special meaning in C++.
keywords
must not be used as constant or
variable or any other identifier names.
keywords
are case sensitive and should be
in lowercase.
keywords
Other names which you should not use as variables are the
names of
data types such as int, char, float.
a name used to identify a variable, function, class,
module, or any other user-defined item.
identifier
starts with a letter A to Z or a to z or an underscore (_)
followed by zero or more letters, underscores, and digits (0 to 9)
identifier
does c++ allow punctuation characters within identifiers?
no
also known as user-defined identifier
variable
It is a data
storage location that has a value, which can change during
program execution.
variable
All variables in C++ must be declared prior to their use
true
Characters a to z and A to Z
(NOTE: upper case and lower case are not distinct) in variables
false
first character of a variable must be a
letter
only what may follow the initial letter
letters, digits or underscores