What is the difference between declaration and definition?
Answer Posted / sanjay
The definition is the one that actually allocates space,
and provides an initialization value, if any.
There can be many declarations, but there must be exactly
one definition. A definition tells the compiler to set
aside storage for the variable. A declaration makes the
variable known to parts of the program that may wish to use
it. A variable might be defined and declared in the same
statement
| Is This Answer Correct ? | 57 Yes | 5 No |
Post New Answer View All Answers
What are the components of marker interface?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What are two types of polymorphism?
What are the 5 oop principles?
Explain virtual inheritance?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is pure oop?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
Why do while loop is used?
What is abstract class in oop?
what is the sylabus for priliminaries?
What is abstraction encapsulation?
what is graphics
What is difference between abstraction and encapsulation?
What is constructor overloading in oop?