What is the difference between declaration and definition?

Answer Posted / friend nitk

The declaration tells the compiler that at some later point
we plan to present the definition of this declaration.
E.g.: void stars () //function declaration
The definition contains the actual implementation.
E.g.: void stars () // declarator
{
for(int j=10; j > =0; j--) //function body
cout << *;
cout << endl; }

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why polymorphism is used in oops?

585


Why do we need polymorphism in c#?

690


What is destructor in oop?

626


What does and I oop and sksksk mean?

654


Why multiple inheritance is not allowed?

586






What is super in oop?

599


What is difference between inheritance and polymorphism?

574


What is overloading in oops?

598


Is enum a class?

607


How oops is better than procedural?

592


Why is encapsulation used?

577


What is difference between data abstraction and encapsulation?

619


What is class and object in oops?

613


What is ambiguity in inheritance?

625


can inline function declare in private part of class?

3661