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
How can I insert or delete a line (or record) in the middle of a file?
Which is the memory area not included in C program? give the reason
What does printf does?
will u please send me the placement papers to my mail???????????????????
How can I avoid the abort, retry, fail messages?
the question is that what you have been doing all these periods (one year gap)
Write a program for Overriding.
What is cohesion in c?
How to find a missed value, if you want to store 100 values in a 99 sized array?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
Why is sizeof () an operator and not a function?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
Do variables need to be initialized?
What are the 5 organizational structures?
Where are c variables stored in memory?