Top Answer
User Avatar
Wiki User
Answered 2013-06-19 05:52:04

The term declaration is used when referring to variables. It means that the compiler is told about the type, name, as well as allocated memory cell for variable of a variable.

The later action of the compiler, allocation of storage is called the definition of the variable.


Declaration of variable:

extern int a;

Definition of a variable:

int a=5;

User Avatar

Your Answer

Related Questions

definition: the meaning or description of person/place/thing declaration: taking a stand

A declaration is an incomplete type whereas a definition is a complete type.

Perhaps an example will help. extern int value; /* declaration */ int value; /* definition */ int value= 20; /* definition with initialization */

Declaration is a promise: 'I will define (or has defined) this variable/function somewhere else'.

different between defining value definition section and defining value declaration section

The difference is that the US constitution, has articles and the declaration doesn't.

declaration examples:int main (void);extern int somevariable;definition examples:int main (void) { puts ("Hello world"); return 0; }int somevariable;

A function declaration declares a function's interface but does not implement it. A function definition is itself a declaration, but it also provides the implementation for that interface. Typically we keep interfaces separate from implementation details because it should only be necessary to know what a function does, not how it does it.

Difinition is mean like what is the word mean and translation equivalent mean when this language translate to another language

answering "What is the Difference between kotler's marketing definition and AMA marketing definition?"

Actually, there is a third step, call definition. Declaration is a statement to the compiler of what type an identifier is, definition is the allocation of memory for that identifier, and initialization is the assignment of an initial value to that identifier. Usually, declaration and definition are done together, but you can also add initialization in that step if desired. int a; /* declaration and definition */ a = 1; /* initialization */ int a = 1; /* declaration, definition, and initialization */ For the case of seperate declaration and definition, consider the struct... struct _mystruct { int a; }; /*declaration */ struct _mystruct mystruct; /* definition */ struct _mystruct { int a; } mystruct; /*declaration and definition */ Note: To be more precise: struct _mystruct; /* struct declaration */ struct _mystruct { int a; }; /* struct definition */ typedef struct _mystruct MYTYPE; /* type definition */ extern struct _mystruct mystructvar; /* variable declaration */ struct _mystruct mystructvar; /* variable definition */ struct _mystruct mystructvar = {7} ; /* variable definition with initialization */ struct _mystruct { int a; } mystruct; /* struct definition and variable definition */ extern struct _mystruct { int a; } mystruct; /* struct definition and variable declaration */

How are we to know the difference between 'kids definition' and 'definition'.

The difference between language and culture is language is a way to communicate, and culture is the beliefs, customs, and practices of a society.

There is no difference between procedural programing language & structure programing language

The difference between spoken language and written language is that one is spoke through your mouth and the other is written on paper. the spoken language is composed of symbols

There is no difference. By definition, 'voltage' is synonymous with 'potential difference'.

Communication barrier can be defined as the obstacles to communication between the sender and receiver. Communication barrier can be a result of geographic difference, status difference, language or cultural difference, organization environment etc.

wht is the basic difference between English language with urdu language

Speaking is a verb. Language is a noun.

Declaration of rights of man is giving the right to a man. Declaration of Independence is giving rights to both men and women.

The difference exists only in the definition.

None, these two phrases mean the same thing.Function prototyping or function declarationcontains:name, number and types of parameters, return type and some other details are possible, but no function body is allowed.Function definition is function definition (prototype) and the body.