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 the benefit of oop?
Can a varargs method be overloaded?
What is encapsulation in oop?
What is the significance of classes in oop?
When not to use object oriented programming?
What is overriding vs overloading?
State what is encapsulation and friend function?
What is overloading in oops?
What are the benefits of interface?
What is basic concept of oop?
What is the renewal class?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
Prepare me a program for the animation of train
Is data hiding and abstraction same?
Which method cannot be overridden?