# [C (gcc)], 38 bytes

<!-- language-all: lang-c -->

    f(n){n*=(exp10((int)log10(n)+1)-1)/9;}

[Try it online!][TIO-l61ydbzn]

[C (gcc)]: https://gcc.gnu.org/
[TIO-l61ydbzn]: https://tio.run/##XVDbaoQwFHzfrzgIC4kX1ktdK9a@lH5F9UFiYqVuXEygUvHXa4@Xtd0GTjiZMzPJhDkVY9MkiKSDNFPC@6vnElJLTZu2wlZSy6OOR09xMk4Iw6WoJaEwHADXDGiutHrLIYXBs8HzsVx3bgIbztFjPCY7Fd0507z8ZQcz3VsFwTlESRQ@@GF0U7FWKg3svehM3Dn74N0qNrL@1c/6@AUrNGz4ew6MTS3aDuYseHnJe5S5ydY@gaq/eCvI7Un0tAHmjiRgWQubLmZr4j01uq3JF0qe3E0VTgXR9B7liO5f8F927ZAiiHEswXkG3I8qkxhM26DsPbtKU55vtuNhnL6ZaIpKTc7n5DSXHw "C (gcc) – Try It Online"