CIS3355:
Business Data Structures |
What types of array declarations are there and what do they mean?
There are 3 different array declarations in C programming.
Array Declaration #1: Automatic Arrays (local arrays)
Automatic Arrays are the most common types of declarations.
Array Declaration #2: External Arrays (global arrays) · Defined outside the function8 · Known to ALL functions · Do NOT expire (as long as the program is running) · Initialized when declared (set to 0 (zero) if numeric; null if character)
Array Declaration #3: Static Arrays
Helpful references. Numeric and Logic Declarations Basic C++ Utilities for Primitive Numeric Data
Lets try some questions!!
1. Which array is local to the function?
(Answer - E)
2. True or False - Static Array are the most common types of arrays? (Answer – False, automatic arrays are the most common.)
|