Well of course!
This is an adapter that provides a barrel jack with 12 V using 5 V from the USB port. Since USB is limited to 2 A maximum, charging is very slow but it will work whenever you have access to a USB charger.
Oh you are talking about USB C – never mind then.