Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
//Declare
int foo(int);
//Define
int foo(int){
...
}
//file1.c
extern char stack[10];
extern int stkptr;
....
//file2.c
char stack[10];
int stkptr;
....
sivamit said:Hi what is the diff between these two..?
Can anyone please explain..?
Thanks
Shiva
jhbbunch said:Declaration is like a guy saying to a woman "I will love you forever."
A definition is like the guy saying to the woman "Please marry me." then her accepting the proprosal and the two actually getting married. It is now definite, not just promised.
Variable Definition vs Declaration