In static keyword you are creating a variable in data part of the OS which is accessible to the creating function which means it's scope is local whereas in extern keyword you are actually not creating the variable or simply say you are not reserving space in data part, but you are referring to previously present global variables in data part.