answersLogoWhite

0

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

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

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 default value of Boolean type variable?

False will be the default value of the boolean datatype in java


What value is assigned to extern variable?

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


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.


Default value for instance variable?

Depending on the language you are using the default of an instance variable can be '0', 0, null, empty, '', or have a random number.


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 initial value of a numeric variable?

When we talk about instance variables, the default initial value for a numeric variable is always '0'. Any other variable in your code must be initialized before you can use it. public class MyClass{ public int x; // 0 by default public float y: // 0 by default public MyClass{ int z; z++; // Error 'z' don't have a default value } }


What is the by default value of globally declaration variable?

int, float: 0 pointer: NULL


What is the initial value of (-1-17) and (-3-15)?

When we talk about instance variables, the default initial value for a numeric variable is always '0'. Any other variable in your code must be initialized before you can use it. public class MyClass{ public int x; // 0 by default public float y: // 0 by default public MyClass{ int z; z++; // Error 'z' don't have a default 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 does a Java Boolean type variable declared but not yet initialized contain when its class is instanciated?

If it is a class or instance variable, it gets the default value of false. If it is a local variable (inside a method), it doesn't have a value until you explicitly set one.


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.