| Local Variable | Global Variable |
| Can be accessible within a part of program | Can be accessible anywhere within a program |
| Declared within a function or block | Declared at top level segment of program |
| Its lifetime is function’s runtime | Its lifetime is entire program runtime |