answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Value of automatic variable that is declared but not intialized?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What happens to the value of a local variable when the module in which the variable is declared completes execution and control is passed to a different module?

The local variable goes away and the value is lost.


What are the differences of a constant and a variable?

A constant has only the exact value it's declared and can never be changed. A variable can have any number of values assigned. In programming, a variable can be given a value later in the code but can only be changed during runtime if its been declared as a pointer.


What is Undefined in javascript?

In JavaScript undefined is a special value used when a variable has not had a value set to it, or has not been declared.


How can you change the value of a constant variable in C?

You can change a static variable by putting the static variable into a function that has operations that you intend to execute upon the variable. Example, you want to change the static variable to another value or make an addition of 2. Put the source code inside a function with the static variable declared locally within the function.Every time you call the function, the static variable value will change. Take note that the static variable retains the last value you declared it in your function call.A more terse answerLocal variables declared as static are changed as normal; they are special in that their values persist across function calls.


Can you assign value to variable without using picture clause in mainframes?

No. In COBOL, any variable must be declared with PIC statement.


Which qualifier is used to declare read-only variable in java?

A variable declared as final can't be modified, once a value is assigned.


How can you declare the variable in PHP?

Variables in PHP do not need to be declared like some languages (e.g. JavaScript). This is all that needs to be done to assign a variable: $variable = "Value";


Can you declare printf for integer variable?

printf is declared in stdio.hFormat specifier for an integer value is %d.


What is static variable and how it is declared?

static variables are declared to define a variable as a constant., means if you declare a variable as static the variable becomes costant.syntaxstatic int a=100;this will make the value of a as 100 which is not to be changedWell, no; you think of 'const', which can be used together with static, but not necessarily.Yes you are right bro I was confused it should be const int a=100; then the variable will be a constant.


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.


Where is the best place to declare the variable that holds the control break value?

What is the 'Control break value'? I think it should be declared before the first usage.


What does instance field mean in Java?

Fields defined without the "static" keyword.Their value is unique to each instance (object) of a class.AnswerInstance variable is a variable declared within the class for which every object of the class has its own value.