answersLogoWhite

0


Best Answer

Everything is an object, and "typed" based on assignation. Your variable will be given a class when you declare it to be something, and the class will depend on what value you give the variable. It is always an object though, and its class may change if you change its value.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which is the default variable storage class type in a function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is automatic variable and what is its use?

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


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

automatic storage class


Which is the default storage class in a function?

auto


Which is public to all access class or struct or function or variable?

The default access specifier for a class is private. The default access specifier for a struct is public. It does not matter if it is a function or a variable.


What is the default value of register storage class?

Register storage class is a compiler hint that the variable will be often used, and that it should generate code, if it can, to keep the variable's value in a register.


What is mean of auto in auto int a?

It is the storage class, auto means automatical (or local) variable. You don't have to use it at all: inside a function it is the default, outside it is not allowed to use.


What value is assigned to extern variable?

Default initial value of extern integral type variable is zero otherwise null.


What is static char in C?

static storage class in C tells that: The variable will have the default value as zero. The variable scope will be the file in which it is defined. RaVi


What are storage classes in c?

There are four types of storage classes in c. It defines the scope and lifetime of a variable or function.1. auto - This is the default storage class inside a function. Auto can only be used with in functions. i.e. only for local variables, not for globals.2. register - The variables declared using the register storage class may stored in CPU registers instead of RAM. Since it doesn't have a memory location, the '&' operator for getting the address of the variable cannot be applied (in C). This storage class cannot be used for global scope data.3. static - In case of local variable, it is initialized at compile time and retains its value between the calls. By default the static variables will be initialized to zero, in case of pointer variable initialized to NULL.4. extern - Refers to a public variable defined somewhere else (often in a different source file.)


What is the difference between a static variable a global variable and a local variable?

A static variable is a variable allocated in static storage. A local variable is a variable declared inside a function. A global variable is a variable declared outside of any class or function. Note that local variables and global variables can both be allocated in static storage.


What is the function of default values in java?

Default values are available for any class or instance variable. If you do not specify a value for a class or instance variable the JVM will provide a default value that will ensure that the system does not end up with any unexpected errors because you used a variable that was not initialized. Ex: Public class Test { int I; } In the above class we have just declared an instance variable called 'I' but we haven't associated any value to it. The JVM automatically assigns 0 as the default value to this variable.


Explain the different access storage specifiers available in c?

The storage class specifiers in C and C++ are:autoexternmutableregisterstatictypedefA storage class specifier is used to refine the declaration of a variable, a function, and parameters