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


Write a algorithm to explain the processof wakingbup in morning

Program: Write a program that predicts users' age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an

Programming an odds betting website Project Description: We want someone to program a odds betting website, Require someone with experience and skills! Skills required are

For this assignment, I've provided a data file called 'elevation.mat', which contains the elevation data you'll be working with.   Type load elevation.mat to get the varia

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concate program 1 : package test


n this problem u given a board in which some of the elements are placed as shown in diagram below .each element represent a color .fill the other elements in the board such that no

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta,