Charles becomes king after years as heir apparent