answersLogoWhite

Top Answer
User Avatar
Wiki User
Answered 2012-01-05 03:59:12

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';

123
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Your Answer

Related Questions


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


A discussion of initialization and definition should also include a discussion of declaration. Declaration is the point in compilation where an object is described to the compiler. At that point, the compiler knows the type and size of the object. Definition is the point in compilation where an object is allocated by the compiler. At that point, the compiler knows the address of the object. Initialization is the point in compilation where an object is assigned an initial value. At that point, the compiler knows the value of the object.




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



java is a programming language/platform that embodies object oriented programming concepts. The question of what is the difference is like asking what is the difference between cars and a volvo.


The C and C programming languages are one and the same. There is no difference between those languages.


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


difference between fourth generation language and conventional programming language


Its difference lies in its way of programming...As for PLC we use ladder logic programming and for simple microcontroller we use programming in assembler.


The question is similar to : What is the Difference between "English" and "Talking in English" "C" is a Language. "C Programming" is a verbal usage



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


Primarily, in hardwired programming, you cannot fix any problems in your finished product.


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.


The difference between a program and programming is programming is the actual activity of writing computer code in any of the various computer languages available, the end result of which is a program. The program can then be ran by the computer and perform the task the programmer told it to do.


the basic difference between them is that in greedy algorithm only one decision sequence is ever generated. where as in dynamic programming many decision sequences are generated.


3 differences.................. 1. length wise.... 2.initialization 3. null terminated length of char array is differ from string........ initialization of string is differ from char....... and string is null terminated...........


Look up information on programming.


the basic difference between them is that in greedy algorithm only one decision sequence is ever generated. where as in dynamic programming many decision sequences are generated.


Online programming is programming that has to occur while the computer or other device is connected to the internet. Offline programming doe not require an internet connection.


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


Set/subset: Some high level programming languages are object oriented, but not all of them.


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



Copyright ยฉ 2021 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.