local global as partner of HANNOVER MESSE since many years and as publisher of the Global Business Magazine tries its best to keep the community of Global Business & Markets updated. In line 4, a and b are declared as two global variables of type int.The variable a will be automatically initialized to 0. You can use variables a and b inside any function.
We get a different result when we print the same variable because the variable is declared in both scopes, i.e. the local scope inside foo() and global scope outside foo(). Local to Global Justice is a 501(c)(3) nonprofit organization.