what is the difference between declaration and definition
of a variable or function ?
Answer Posted / suman_kotte
declares a function, but that does not define it.
declaration describes whether the function consist
arguments or not and also it will return a value or not.
definition must be as per the function declaration that was
declared rearlier.it will for the out put of that function.
ex;
main()
{
int a=1,b=2;
void sum(int , int );//declaration
sum(a,b);
}
void sum(int x, int y)//definition
{
printf("%d",x+y);
}
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Where are c variables stored in memory?
What is #pragma statements?
What does nil mean in c?
What is calloc in c?
What do you mean by dynamic memory allocation in c?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
How many identifiers are there in c?
What are the applications of c language?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What is pragma c?
When a c file is executed there are many files that are automatically opened what are they files?
What is #include stdio h?
#include
What is the general form of function in c?
What is the significance of an algorithm to C programming?