if we remove int in local val now lets call the function , here why it was taking local value in function it should take global value, why it was not taking ?
Small Doubt in this Function Demo Global Variable
If the variable in declared somehwere inside the function, it will first refer to the local variable only.