I am trying a small example to know about the static external variable and its uses. The static variable is of local scope and the external variable is of global scope.
remove the keyword static while declaring m and the errors will be removed and you will be able to get the answer as 50. The static keyword makes the scope to restrict within the file.