What does auto, static, public and extern variables means?

What does auto, static, public and extern variables means?

> 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.

> 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.

> Public : A public variable can be declared only within a test or module, and is available for all functions, tests, and compiled modules.

> Extern : An extern declaration indicates a reference to a public variable declared outside of the current test or module. 


By:UMANG
Date:2031-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related TESTING Subjective Links

TESTING Subjective interview questions and answers for experienced and fresher