Ask a Question

what is static and automatic data type??/

on 2012-03-30 00:25:39   by Debasis   on Computer Science & Engineering  1 answers

Deepanwita

on 2012-03-31 09:30:00  

There are for different storage classes specified in C Language. 1. Auto[matic], 2. Extern[al], 3. Static, 4. Register. Automatic variables declared within the function, and the scope lies within the function itself (local). It is the default storage class. Auto variables - If not initialized the unpredictable value is defined and the value is not retained after exit from the function. Static variables also have the same scope as auto variables, but (static)they retain their values throughout the execution of the program and zeros are assigned to all variables whose declaration do not include explicit initial values.