Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Deifference Between Declaration And Defination ?

0 votes
asked Jul 28, 2019 by anonymous

what is Declaration and Definition ?

Difference Between Declaration And Defination ? With Examples  difference

2 Answers

0 votes
answered Aug 1, 2019 by anonymous

Any function can be declared many times but it can be defined only once.

FUNCTION DEFINATION:

int add (int x , int y)

{

int a;

a = x + y;

return a;

}

FUNCTION DECLARATION:

int add (int p1, int p2);

0 votes
answered Aug 1, 2019 by Loki (1,600 points)
Simply speaking declaration of a function tells about the return type, parameters taken their type and name of the function only while the declaration with all this also consists of the code that will be executed when the function is called.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...