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
What is abstraction in oop with example?
How do you answer polymorphism?
Is oop better than procedural?
What are benefits of oop?
What is the use of oops?
What is multilevel inheritance in oop?
What is class and object with example?
What is the example of polymorphism?
How do you explain polymorphism?
Is html an oop?
What does <> mean pseudocode?
What is cohesion in oop?
What is the full form of oops?
Why polymorphism is used in oops?
What is oops concept with example?