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
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
How do you generate random numbers in C?
Difference between Function to pointer and pointer to function
What does c mean before a date?
Why are all header files not declared in every c program?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What are the 5 types of inheritance in c ++?
How many levels of indirection in pointers can you have in a single declaration?
Does c have enums?
What is a class c rental property?
How do I round numbers?
Write a c program to demonstrate character and string constants?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is mean by data types in c?
What are the general description for loop statement and available loop types in c?