answersLogoWhite

0

Well, in languages like C or C++, a variable is just a memory cell. The memory cell can contain any, and then I really mean any, value. For instance, if I were to do something like the following:

int x;

Then I would have no idea what the value of x is, since I did not initialize it. However,

int x = 0;

initializes the variable to be zero.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is Variable declaration and variable initialization?

...are important things in programming. Example: extern int variable; /* declaration */ int variable= 8; /* definition with initialization */


Assigning a value to a variable in a declaration statement is called?

Answer is; initialization *** Edit*** Initialization is correct. Page 59 Programming Logic and Design by Tony Gladdis


What is initial variable?

Variable initialization is the assignment of an initial value to a variable.


What is the intialization in c?

Initialization is nothing but assigning some value to a parameter. ex :- int a; // Defination of an integer variable a = 3; // Initialization of the variable a


What is a computer variables?

In a programming language, a variable is a name for a place where information is stored.


What is an initialization statement?

When a declared variable receives a value to hold. i.e. int lalalala; lalalala = 0; //initialization of lalalala


What is the difference between initialization assignment of a variable in C programming explain withexample?

Initialization is when you assign a value to a variable at definition. For instance...int i = 123;Assignment is when you assign a value to a variable at a later time. For instance...int i;i = 123;Sometimes, automatic initialization (to zero) can occur without the explicit = clause, such as for file scoped variables, or for variables allocated through a debug allocator, but it is in bad form to depend on such values.I would fire a programmer that repeatedly fails to initialize variables, and I would flunk a student that does the same.


What is the difference between instantiation and initialization in C plus plus?

Instantiation is creating the instance of the variable/object . While Initialization is to provide the variable with some value. int i; // i is an instance of an integer i=10; //initialised with the value 10


What do you mean by initialization in c plus plus?

Not initialized variable: int myInt; Initialized variable: int myInt = 10;


What does variable allow you to do that you couldn't do before?

In computer programming, or in algebra? In computer programming, you can store a value that you recover later, and you can do generic calculations, which work for all sorts of numbers, not just for one specific number.


What does a variable allow you to do that you couldn't do before?

In computer programming, or in algebra? In computer programming, you can store a value that you recover later, and you can do generic calculations, which work for all sorts of numbers, not just for one specific number.


What is a letter used to represent one or more numbers called?

A variable. In computer programming, you can have a single variable for a group of related numbers - in this case, you speak about an array.