a) auto: An auto variable can be declared only within a function and is local to that function. It exists only for as long as the function is running. A new copy of the variable is created each time the function is called.
b) static: A static variable is local to the function, test, or compiled module in which it is declared. The variable retains its value until the test is terminated by an Abort command. This variable is initialized each time the definition of the function is executed.
c) public: A public variable can be declared only within a test or module, and is available for all functions, tests, and compiled modules.
d) extern: An extern declaration indicates a reference to a public variable declared outside of the current test or module.

[Source: JAGAN MOHAN "Interview questions bible"]






Answers and Comments