answersLogoWhite

0


Best Answer

This is when you specify the name and type of the variable.

Example:

int number;


The declaration line can also include an instantiation for that variable.


Example:


int number = 5;

When you declare a variable or an object (particularly in OOP programming) , you set aside a chunk of memory space for the data to reside.

User Avatar

Wiki User

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

Wiki User

13y ago

the name the variable will use and the type of data it will hold, such as a string or integer (words or numbers)

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

You must specify the variable type and an identifier.

int n; // type - int, identifier - n

This answer is:
User Avatar

User Avatar

Nanaba Sylvester

Lvl 2
3y ago
  1. Variable name

  2. variable Data type

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What two things must you normally specify in a variable declaration?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is Variable declaration and variable initialization?

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


What specifies a variable's name and data type?

Most programming languages require that you declare all of the variables that you intend to use in a program. A variable declaration is a statement that typically specifies two things about a variable:* The variable's name* The variable's data typePosted by Special:Contributions***EDIT***This can be found on page 56 in "Programming Logic and Design" by Tony Gladdis


What do you normally create when you want to run a function in the background while processing other things?

You normally create a thread when you want to run a function in the background while processing other things.


What is a select case statement used for in programming?

In programming, select case statement is a way to test the inside of a variable. It is used when one knows there is a limited number of things that can be in the variable.


Why is data type important?

All data is stored in a computer as 0s and 1s. In order to make this more efficient, certain sets of bits can mean different things depending on what the data type is. Some languages, such as Java, make sure the programmer doesn't confuse these types and mess up the data. However, other languages allow you to do things like multiply a string and an array. If you don't pay careful attention to data types, you can easily end up with useless data.

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 */


What three things must the compiler do when it encounters a variable declaration?

rfd


What specifies a variable's name and data type?

Most programming languages require that you declare all of the variables that you intend to use in a program. A variable declaration is a statement that typically specifies two things about a variable:* The variable's name* The variable's data typePosted by Special:Contributions***EDIT***This can be found on page 56 in "Programming Logic and Design" by Tony Gladdis


What does Q mean in mathematical term?

Q is a variable, it can stand for different things in different cases.Q is a variable, it can stand for different things in different cases.Q is a variable, it can stand for different things in different cases.Q is a variable, it can stand for different things in different cases.


What is the solubility for silver?

If you mean the metal, extremely low (people don't normally make spoons out of things that dissolve readily). If you mean a silver compound, you'd have to specify which one.


What is meant by the dependent variable?

the dependent variable are the things that stay the same


What are the variables in a controlled experiment?

the things you change


Why was the Texas Declaration of Independence similar to the American Declaration of Independence?

both stated the same things


What is the experimental variable and what is the dependent variable?

the experimental variable is like the independent variable, which is the only thing you can change in a science experiment, and the dependent variables are the things that stay the same.


Things that can change in an experiment are called?

A variable.


What is valuable?

Do you mean variable? It is a variable which depends on other things such as equations involving other inputs.


What variable was tested in Pasteur's experiment?

The tested variable is whether or not things rose spontaneously from the broth.