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
Who invented bcpl language?
Why c language is called c?
Write the control statements in C language
Why calloc is better than malloc?
Explain how can I make sure that my program is the only one accessing a file?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
explain what is an endless loop?
How can I find the modification date and time of a file?
How will you delete a node in DLL?
Can you explain the four storage classes in C?
Explain how can you restore a redirected standard stream?
Explain about the constants which help in debugging?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
How do I convert a string to all upper or lower case?
What is #line in c?