answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Nothing, random value, unless you initialize the variable explicitly.
Note: 'register' is not a storage class, it's only a modifier for 'auto' storage class.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the default value of register storage class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What value is assigned to extern variable?

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


Default value of register variable?

If you don't initialize it, you will find random garbage in it. (The same is true for auto class.)


What is storage claases in c language?

storage classes is important part of c language.WHENEVER we define any function in c program then we can call that in every definend class. there are four types of storage class. these are... 1 AUTO OR AUTOMATIC STORAGE CLASS 2 REGISTER STORAGE CLASS 3 STATIC STORAGE CLASS 4 EXTERNALSTORAGE CLASS 1) The features of "AUTOMETIC" storage class are as under some conditions: storage : storage will be in memory. value : garbage value. scope : scope is local to block to the variable. life : till, controls remain within the block. 2) The featurs of "STATIC" storage class are as under some conditions: storage : memory. value : zero. scope : local to block. life : Till control remains within the block. 3) The featurs of "REGISTER" storage class are as under some conditions: storage : register. value : garbage value. scope : local to the block. life : value persists between variable. 4) The feature of "EXTERNAL" storage class are as under some conditions: storage : memory. value : zero. scope : local to block. life : till controls remains within the block.


Which is the default variable storage class type in a function?

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.


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

Related questions

What are storage classes in c language?

There are Four main storage classes are there in c language 1.static(0 is default value of this class ,local area) 2.auto( Garbage value is default value of this class,local area) 3.register(Faster execution i.e, CPU receives values directly from register) 4.extern(specification for out of program)


What is class register?

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 value is assigned to extern variable?

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


Default value of register variable?

If you don't initialize it, you will find random garbage in it. (The same is true for auto class.)


What is storage claases in c language?

storage classes is important part of c language.WHENEVER we define any function in c program then we can call that in every definend class. there are four types of storage class. these are... 1 AUTO OR AUTOMATIC STORAGE CLASS 2 REGISTER STORAGE CLASS 3 STATIC STORAGE CLASS 4 EXTERNALSTORAGE CLASS 1) The features of "AUTOMETIC" storage class are as under some conditions: storage : storage will be in memory. value : garbage value. scope : scope is local to block to the variable. life : till, controls remain within the block. 2) The featurs of "STATIC" storage class are as under some conditions: storage : memory. value : zero. scope : local to block. life : Till control remains within the block. 3) The featurs of "REGISTER" storage class are as under some conditions: storage : register. value : garbage value. scope : local to the block. life : value persists between variable. 4) The feature of "EXTERNAL" storage class are as under some conditions: storage : memory. value : zero. scope : local to block. life : till controls remains within the block.


Which is the default variable storage class type in a function?

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.


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 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.


What is the default value of integer in java?

According to the JLS, the default value of an int is 0. The default value of an object of type Integer is null. Of course, this applies only to class members fields, as local method-level fields must be explicitly assigned a value before use.


What is data storage in c plus plus?

A storage class is not a class as such, it is a modifier. C++ provides several built-in storage classes: auto, register, static, extern and mutable. The auto storage class is implied for all function local variables and it can only be used in functions. Since it is implied it is rarely used. However, with C++11, the auto keyword has an alternative use, allowing unambiguous types to be deduced without the need to explicitly declare their type. This greatly simplifies code where the type is of little importance to the reader, and is particularly useful when iterating through an STL container as it greatly simplifies and shortens the declaration of the for statement that controls the loop. The register storage class can be used for any variable that will fit in a CPU register. Since register variables do not exist in RAM, they have no address. Declaring a register variable is not a guarantee that the variable will be stored in a register, only that it might be. Simple variables such as counters are good candidates for register variables, however your compiler should be able to automatically determine when to use a register rather than RAM for a variable. The static storage class ensures that a variable remains in memory at all times. This does not mean the variable is accessible at all times, however, since visibility is ultimately determined by the variable's scope. However, when you modify a static variable that is in scope, it will maintain that value even when it falls from scope (static variables are never destroyed). All static variables must be initialised with a value and each time the program is run, they will default to the initial value. Class member functions as well as variables can be declared static. Static members of a class are local to the class, rather than to an instance of the class. They are generally used to provide internal class functionality or information that is common to all instances of the class (much like global functions and variables, but scoped to the class). Public static members are also accessible outside of the class, even when no instances of the class exist. Extern provides external linkage to a global variable that is defined in another file. This is typically used when two or more source files share the same global variable. One file defines the global while all others declare it external. The mutable storage class is only used in classes, and allows the member to override the constness of the class. That is, when calling constant member functions, the class' mutable members can be modified while the immutable (normal) members remain constant. Mutable members are typically used internally be the class, such that the external "state" of the class can remain constant.


What is the difference between default constructor and parameterized constructor?

A default constructor is one that has no parameters (C++ also calls constructors with all default parameters a default constructor), while a parameterized constructor is one that has at least one parameter without a default value. Default constructors can be provided by the compiler if no other constructors are defined for that class or any class the class inherits from, while parameterized constructors must always be defined by the developer.