Technical Discussion :: C++
Home > Freshers > Technical Interview Questions > C++
48. What is the difference between declaration and definition?
Answer:
In C , function declaration is means telling the compiler that a function occurs but there's no definition given to it. When in the program, the function with definition is given, it's known as function definition.
For eg.: void display();//function declaration
void display){ cout<<"Function Definition";}//Function Definition
Asked In :: iGate Virtusa Syntel Inc. Accenture
In C , function declaration is means telling the compiler that a function occurs but there's no definition given to it. When in the program, the function with definition is given, it's known as function definition.
For eg.: void display();//function declaration
void display){ cout<<"Function Definition";}//Function Definition