COSC 1436 - Chapter 3 Study Guide Question
with Verified Correct Answers
text
a group of characters treated as one unit and not used in a calculation
variable
a memory location whose value can change (vary) during runtime (usually in lower case or
camel case)
runtime
when a program is running
named constant
a memory location whose value cannot be changed during runtime (usually in all uppercase)
keyword
a word that has special meaning in the programming language you are using.
How to name a memory location in C++
1. The name must begin with a letter
2. The name can contain only letters, numbers and the underscore character. No punctuation
marks, spaces or other special characters are allowed in the name.
3. The name cannot be a keyword
4. names in C++ are case sensitive
How many items can a memory location store at a time?
One
, What are the two types of memory locations that a programmer can declare?
variable & named constant
fundamental data types
the basic data types built into the C++ language and often referred to as primitive data types
or built in data types.
short (integer)
int (integer)
float (real number with 7 digits of precision)
double (real number with 15 digits of precision)
bool (a Boolean value t/f)
char (one character)
string (zero or more characters)
The string data type is a class and is referred to as
user-defined data type
The Boolean values are named in honor of:
the English mathematician George Boole (1815-1864), who invented Boolean algebra.
binary number system
Numbers are represented in internal memory using the binary (or base 2) number system
using digits 0 and 1
decimal number system
uses the 10 digitals 0 through 9 (base 10)
with Verified Correct Answers
text
a group of characters treated as one unit and not used in a calculation
variable
a memory location whose value can change (vary) during runtime (usually in lower case or
camel case)
runtime
when a program is running
named constant
a memory location whose value cannot be changed during runtime (usually in all uppercase)
keyword
a word that has special meaning in the programming language you are using.
How to name a memory location in C++
1. The name must begin with a letter
2. The name can contain only letters, numbers and the underscore character. No punctuation
marks, spaces or other special characters are allowed in the name.
3. The name cannot be a keyword
4. names in C++ are case sensitive
How many items can a memory location store at a time?
One
, What are the two types of memory locations that a programmer can declare?
variable & named constant
fundamental data types
the basic data types built into the C++ language and often referred to as primitive data types
or built in data types.
short (integer)
int (integer)
float (real number with 7 digits of precision)
double (real number with 15 digits of precision)
bool (a Boolean value t/f)
char (one character)
string (zero or more characters)
The string data type is a class and is referred to as
user-defined data type
The Boolean values are named in honor of:
the English mathematician George Boole (1815-1864), who invented Boolean algebra.
binary number system
Numbers are represented in internal memory using the binary (or base 2) number system
using digits 0 and 1
decimal number system
uses the 10 digitals 0 through 9 (base 10)