answersLogoWhite

0

...are important things in programming.

Example:

extern int variable; /* declaration */

int variable= 8; /* definition with initialization */

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is initial variable?

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


When variable in c gets memory After declaration or initialization?

Definition. Example: extern int x1; /* declaration */ int x2; /* definition */ int x3= 2; /* 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 the difference between declaring variable and initializing variables?

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


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 do you mean by initialization in c plus plus?

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


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 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 is variable declarations?

A variable declaration is a math or programming term. A variable is an unnamed component. In the problem the wording will declare what the value of the variable is.


What is different between a definition and declaration of a variable?

A declaration and definition of a variable are nearly synonymous, especially as it is found in source code. However, the concepts are separate. The definition of a variable may include variable name, type, scope, operating range, and initial value(s). Program documentation includes only the definition of a variable; not the declaration. It defines the meaning and use of a variable. Whereas the declaration of a variable indicates to the compiler/interpreter that the name should be recognized as a variable. Understand that when the variable declaration is given in source code it may include the definition, though not always. In some languages a variable may be declared and then defined later as to type, operating range, et al.


Where the declaration of c variable can be done?

at orchard road on the shop where the variable can be done.


What is the difference between initialisation and definition in C programming?

Variable-declaration is: extern int x; extern double y; extern char a; Variable-definition is: int x; static double y; auto char a; Variable-definition with initialization is: int x = 1; static double y= 2.3; auto char a = 'w';


Difference between declaring a variable and definition a variable?

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


What is variable initialization in computer programming?

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.


What is the optional in a variable declaration statement?

Optional is the assignment of the value of course.int number; //Variable Declarationint number=2; //Assignment Declaration


What is pointer initialization?

Assigning an initial value to a pointer variable. Example: int *p= NULL;


How a variable is declared and initialized during declaration in c?

During declaration, the declaration goes like this: extern <type> <variable-name> or <type> <function-name> (<parameter list>);


What is a hole-in-scope?

when inner declaration of a variable hides its outer declaration


What is a declaring variable?

Variable declaration is when you declare a variable. For example: String foo; The data type is String and now I can modify foo and don't need to type String again. It can be an instance variable or a local variable.


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