How to install a specific version of package using Composer?

Syntax: composer require vendor/package:version

Examples:

# example-1
composer require nesbot/carbon:^2.0

# example-2:
composer require nesbot/carbon ^2.0

# example-3:
composer require "nesbot/carbon:2.*"