Embed presentation
Download to read offline




Local variables are declared within sub-programs and can only be accessed and modified within that sub-program. Global variables are declared in the main program and can be accessed and modified by any code in the entire program. While global variables can be recognized program-wide, they should generally be avoided as the code is harder to read, debug, and track which parts are updating the variable.



