C++ code showing usage of storage classes i.e: global variables vs local variables