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

What is class and object in oops?

605


What is class in oop with example?

608


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.

1448


What is cohesion in oop?

610


What are oops methods?

560






What is polymorphism used for?

564


What is class and object with example?

581


what is graphics

2003


What are the advantages of polymorphism?

568


How long to learn object oriented programming?

555


Get me a number puzzle game-program

1688


What are two types of polymorphism?

607


What is polymorphism in oops with example?

525


What is polymorphism what are the different types of polymorphism?

553


What is debug class?what is trace class? What differences are between them? With examples.

1598