The output is 061.
Global variable:
A variable declared out side of all functions it is known as global variable.
Local variable:
A variable declared inside of a function it is known as local variable. If a variable declared inside a function(main or other) with the same name of a global variable. The function uses the value of local variable and does not use the value of the global variable.
Here int a = 0 is a global variable. In the main function the global variable ‘a’ is used. There is no local variable so the value of ‘a’, 0 is displayed. The statement ‘a++’ makes the value of ‘a’ is 1. It calls the function showval with argument ‘a = T.
The argument ‘x’ will get this value i.e. ‘x = 1 But in the function showval there is a local variable ‘a’ its value is 5 is used. So this function returns 6 and it will be displayed. After this the value 1 of the global variable ‘a’ will be displayed. Hence the result 061.