answersLogoWhite

0

In C, uninitialized variables may contain any value, usually whatever happened to be in the same memory location before the memory was allocated to that function. This is a likely source of bugs, since it means that whatever the programmer meant for the variable to contain was not in it.

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

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


Postfix to Infix java?

A postfix incrementation or decrementation is handled by the ++ and -- operators. Postfix specifically refers to adding the operator after the variable name (eg. i++). This will attempt to increase/decrease the data type by 1. It differs from prefix in that it will return the variable before the calculation.Example:int i = 1;System.out.print(i++); //1System.out.print(i); //2


What is the default initial value for all numeric types?

If they are instance variables the default initial value is 0. If they are method local variables, they are null and must be initialized to some value before they are used


Variable declarations are made in what section of a program?

Variable declarations are made within the scope in which they are used and, preferably, at the precise point they are used, not before.


Declaration can appear anywhere in the body of java method ATrue B False?

Partially true and partially false. A variable's declaration must happen atleast one life before the usage of that variable. Therefore we can take this as declaration can be done anywhere provided we declare it before the usage. otherwise it would throw a compilation error.

Related Questions

What is the difference between a do while loop and a for loop in c?

the counter variable cannot be initialized in while loop before entering into the block.


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 number before a variable?

the coefficient of the variable


What is it called when the independent variable comes before the dependent variable?

An antecedent variable is one that comes before the dependent variable. They stand by themselves, thus are independent.


What is the coefficient of a term that consists of a single variable?

The numerical value that comes before the variable or, if none, the coefficient is 1.The numerical value that comes before the variable or, if none, the coefficient is 1.The numerical value that comes before the variable or, if none, the coefficient is 1.The numerical value that comes before the variable or, if none, the coefficient is 1.


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


Postfix to Infix java?

A postfix incrementation or decrementation is handled by the ++ and -- operators. Postfix specifically refers to adding the operator after the variable name (eg. i++). This will attempt to increase/decrease the data type by 1. It differs from prefix in that it will return the variable before the calculation.Example:int i = 1;System.out.print(i++); //1System.out.print(i); //2


What variable should you already know before you perform a experiment?

A manipulated variable. (Apex)


If a radical is multiplied by a number or variable you should put the number or variable the radical sign?

before


The number before a variable in a term?

The coefficient


When you attempt to start your computer by pressing the power button nothing happens What is your next step before calling technical support?

Unplug the motum leave it for 10 minutes and then try again


A variable that changes as a result of the other variable?

The dependent variable.