Question: What is a difference between global variable and persistent variables?

  1. Global variables have a higher performance overhead than persistent variables.
  2. Global variables remain in memory after clear all; persistent variables do not.
  3. Global variables can be used to cache data in memory; persistent variables cannot.
  4. Global variables are accessible outside the function scope; persistent variables are not.

Answer: The correct answer of the above question is Option D:Global variables are accessible outside the function scope; persistent variables are not.