When the global and the local variable have the same name :
1. Local variable is taken in the local scope where it is defined.
2. Outside the local scope the global is used.
So if we have
int x = 5;
int x = 10;
printf("x is : ",x);
// This code here prints 10