Define automatic storage classes - computer programming, C/C++ Programming

Define Automatic storage classes - computer programming?

The Variables declared within function bodies are automatic by default and automatic variables are declared inside a function in which they are to be utilized. They are created when the function is destroyed and called automatically when the function is exited, thus the name automatic. Automatic variables are as well referred as internal or local variables.

Declarations of the variables within blocks are implicitly of storage class automatic. The keyword 'auto' is able to be used to explicitly specify the storage class.

An instance is
auto int a, b;
auto float f;

When the block is entered then the system allocates memory for the automatic variables. Within that block these variables are considered and are defined "local" to the block and the system releases the memory that was set aside for the automatic variables. Therefore the value of the variables is lost. If the block is reentered the system once more allocates memory, however previous values are unknown.

One significant feature of automatic variables is that their value can't be changed accidentally by what happens in some other function in the program. 

Posted Date: 6/13/2013 6:02:08 AM | Location : United States







Related Discussions:- Define automatic storage classes - computer programming, Assignment Help, Ask Question on Define automatic storage classes - computer programming, Get Answer, Expert's Help, Define automatic storage classes - computer programming Discussions

Write discussion on Define automatic storage classes - computer programming
Your posts are moderated
Related Questions
What are pre-processor directives? - Pre-processor directives are placed at the beginning of a C program. They begin with # symbol. - This is the place, where library files

Determine the types of Container class Container class can be of 2 types: - Heterogeneous container - Here container class comprise a group of mixed objects - Homogeneou

write a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits a and b

If an array holds integer, each of which is four bytes long, how many bytes from the base location of the array is the location of the fifth element?

Define Keywords in C++ K e y w o r d s: K e y w o rd s a r e t h e w o rd s a l r e a d y u s e d b y C + + i n i t s c

#include stdio.h> #include conio.h> #include string.h> void main() {           int i=0,j=0,k=0,l=0;           int a[3][3],temp[3][3];           clrscr();

1 Aims The main purpose of the assignment is to let you practice the following programming techniques: perform operations on pointers to basic and more complex types;

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Ask question #Minimum 100Problem : Compiler Design - Limit the methods Rahul is a newbie to the programming and while learning the programming language he came to know the followi

Run the following C++ program with and without preprocessor variable POSTFIX defined. #include using namespace std; extern "C" int atoi( const char *str );