answersLogoWhite

0

It is a local variable known only to the function in which it is declared. Auto is the default storage class.

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

ReneRene
Change my mind. I dare you.
Chat with Rene
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake

Add your answer:

Earn +20 pts
Q: What is automatic variable and what is its use?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the definition of EDVAC?

Electronic Discrete Variable Automatic Computer.


What is the by default storage class of any variable in c?

automatic storage class


Value of automatic variable that is declared but not intialized?

The value of an automatic variable that is declared but not initialized is indeterminate.Some debug implementations will preset uninitialized variables to a known state, such as 0xcccccccc, or my favorite, 0xcacacaca, but that is just a hint that you are doing something very, very wrong if you ever encounter such a value.


Why use static variable in programming language?

For C programming, the use of a static variable has two uses: One reason is to hide the variable from other modules. The scope of the static variable is limited to the compilation unit that it is described in. The second use of a static variable is to keep the value of the variable intact through the entire program execution unit.


What are the functions of a storage class?

There are four storage class specifiers in C and C++. These are - 1. auto : The storage specifier auto refers to automatic variable declaration. The life of an automatic variable is the time during which its parent function is running. The scope of an auto variable is the function scope. They can be accessed only from their parent functions. Syntax : auto int a; 2. register : A register variable has all the characteristics of an auto variable. The only difference is that auto variable uses the main memory to store data and register uses the CPU registers. 3. extern : This storage specifier is used to declare a global variable. The life of these variables is the time during which the program runs.