How extern can be used?
In which file the variable without extern to be declared?
Or there is no such restrictions?
"Extern is used to access global variables/functions that have been declared in another module/file."
Actually, the global variables/functions must be defined in another module/file - extern provides just a declaration.
The definition is what actually creates the "object"; ie, allocates memory or generates code. Every "object" must have exactly one definition.
A declaration simply provides information that an "object" is defined elsewhere. An "object" may have many declarations.