What is the difference between declaration and definition?
Answer Posted / durga devi sathi
Declaration of a variable means name the variable and tells
compiler that this has been present elsewhere in the program
Definition means that allocate or reserve some space and
store the value in that variable.
the variables like auto and registers, the declaration and
definition done at the same time because they are named the
variable and allocate the memory at the same time.
Ex- int a;//declaration and definition
extern int a;//only declaration
once the variable is defined it is ready to hold the data
value needed by the program
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How is polymorphism achieved?
What is destructor example?
What is encapsulation oop?
What does and I oop mean in text?
Can static class have constructor?
class type to basic type conversion
Which type does string inherit from?
What are main features of oop?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
Why it is called runtime polymorphism?
What is the difference between a constructor and a destructor?
Is data hiding and abstraction same?
What is the difference between procedural programming and oops?
What is destructor oops?
What are the three parts of a simple empty class?