November 2001
Beginner to intermediate
816 pages
16h 3m
English
Definite assignment is a rule simply stating every variable must have a value before it's read from. The process of assigning a value to a variable for the first time is known as initialization. Once the initialization process has taken place, a variable is considered initialized. If the initialization process has not yet taken place, a variable is considered to be uninitialized. Initialization ensures that variables have valid values when expressions are evaluated. Uninitialized variables are unassigned variables. If a program attempts to read from an unassigned variable, the compiler will generate an error.
For C++ ProgrammersC++ programs are allowed to read data from uninitialized variables. C# detects uninitialized variables ... |
Read now
Unlock full access