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
Explain what is the difference between a free-standing and a hosted environment?
What is a const pointer in c?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
Is c is a low level language?
Why do we use header files in c?
Is linux written in c?
What is %g in c?
How can you draw circles in C?
What is %d used for?
What is the difference between printf and scanf in c?
Write a program to check prime number in c programming?
What is a char in c?
What is auto keyword in c?
What is a sequential access file?
Why C language is a procedural language?