How to differentiate b/n definition and declaration?

How to differentiate b/n definition and declaration?

Some useful difference b/n definition and declaration are given below:

When define an object not only its attribute are made known,but its object are also created.Where as when we declare an object only its attribute are made known. 
Example:
We define object like;
long int lSum; 
long int lCount;
void SumInt(int nItem)
{
   lSum =lSum + (long)nItem;
   ++lCount;
}

We declare an object like;
void VFunction(int nType)
{
   int nTest;
   nTest = nType;
}

By:Vivek Kr. Agarwal
Date:2007-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher