What is the difference between declaration and definition?
Answer Posted / soumyajit
During declaration we just specify the type and no memory
is allocated to the variable. But during the definition an
initial value is assigned and memory is allocated to the
variable.
or we can also say,
Declaration means just telling to complier about variable
or function but definition means actually allocating memory
for variable.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is difference between abstraction and encapsulation?
What are different oops concepts?
What is the difference between encapsulation and polymorphism?
What is destructor give example?
Why do we use polymorphism in oops?
What are the 3 pillars of oop?
What is ambiguity in inheritance?
What is the full form of oops?
What is meant by oops concept?
What is a function in oop?
Why we use classes in oop?
What is debug class?what is trace class? What differences are between them? With examples.
What is the point of oop?
What is polymorphism in oop example?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer