What is the difference between declaration and definition?
Answer Posted / krishna chowdary garapati
Declaration means it exits but it has no meaning. But where
as definition means it has a meaning. Without decalration
there is no definition. Why means without existing how can
we use.
Some situations we do both in a single statement like,
int i = 10;
here i is declared and definie with the value 10;
But some languages give some value to the variable without
defining like
class DiffsDemo {
int i;
}
DiffsDemo demo = new DiffsDemo();
print: demo.i;
output: 0;
This will happen because some default values are assigned
to that types. Internally at run time they will define.
Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
What are the types of abstraction?
Can an interface inherit a class?
Which language is pure oop?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is a null tree?
What is abstraction encapsulation?
How to use CMutex, CSemaphore in VC++ MFC
Why is object oriented programming so hard?
What is a class oop?
What is abstraction and encapsulation?
Which is better struts or spring?
What is difference between pop and oop?
What does <> mean pseudocode?
Write a program to sort the number with different sorts in one program ??
Describe these concepts: Polymorphism, Inheritance and Abstraction.