hi,
Every one here knows the difference between global variables and extern variables.
Thing am not sure about is; if i have defined a global variable outside main(); before main, it works fine.
if we define it at the same place and use extern in main(), it still works.
It is totally right syntactically and oterwise also.
But isn't it a bit weird?.. i mean it's not defined outside the file and still the use of extern is not raising any error?
I feel that it should raise an error.
Every one here knows the difference between global variables and extern variables.
Thing am not sure about is; if i have defined a global variable outside main(); before main, it works fine.
if we define it at the same place and use extern in main(), it still works.
It is totally right syntactically and oterwise also.
But isn't it a bit weird?.. i mean it's not defined outside the file and still the use of extern is not raising any error?
I feel that it should raise an error.
Comment