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
Is register a keyword in c?
Explain what are linked list?
What are # preprocessor operator in c?
What is use of null pointer in c?
What is time null in c?
What are the types of assignment statements?
What does a function declared as pascal do differently?
write a c program to find the sum of five entered numbers using an array named number
Where static variables are stored in c?
Hai what is the different types of versions and their differences
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
What is the easiest sorting method to use?
Explain the concept and use of type void.
Is it better to use malloc() or calloc()?
What is wrong with this program statement? void = 10;