Technical Discussion :: C++
Home > Technical Interview Q&A > C++ > Discussion
7 / 187
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 ::

Varun Kumar Rai
23 Feb, 2019 5:07 AM
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