Topic 2 Flashcards
When solving a programming problem, try to use a
Modular Approach
is a program consisting of interrelated statements arranged in logical and understandable form
modular program
is referred to as a small segment which is designed to perform a specific task
Module
is a symbolic identifier for a memory address where data can be held
variable
used to name storage locations
Variable
is a memory location whose contents can
vary, also called an identifier
variable
Name must be a __________,
but can be formed from several
words
single word
First character must be a ________
or _____________
letter, underscore
Only ______, ______, and ____________ may follow the initial letter ( no blanks or spaces allowed )
letters, digits, underscore
____________ cannot be used as
identifiers
Keywords
Variable names are ____ __________
case sensitive
Keywords are also referred to as ________ _____, for they cannot be used as variable names
reserved words
Conventions
- Use underscore to separate
words, for readability - Or, capitalize the first letter of
each word (Pascal Case) - Be mindful of using some characters:
Invalid Identifiers
- begins with a number
- contains a special character
- a keyword
: ordering of data types
by size
Data Hierarchy