what if the government closes or does not allow the exchange of Bitcoin or cryptocurrencies with the official currency in each country?

Are you forgetting Bitcoin is a decentralized currency, that means nobody can control how it is been exchange as the exchange of Bitcoin can be done peer2peer without the involvement of third parties like the centralized exchange and escrow services, meaning the government would not have any data to track the transacting of Bitcoin.
Bitcoin is not control by any government or country so the banning if exchange on those county would not have much effect as everyone will turn to decentralized exchange. This could be positive for Bitcoin if it does happen as more development will be pushed towards a more decentralized exchange of Bitcoin instead of relaying on this centralized exchanges.