Initializing Local and Global Variables
- -A
- Jan 28, 2020
- 1 min read
When a local variable is defined, it is not initialized by the system, you must initialize it yourself. Global variables are initialized automatically by the system when you define them as follows −

It is a good programming practice to initialize variables properly, otherwise sometimes program would produce unexpected result.
Comments