10 is a constant, so the compiler will use the number 10 directly in the executable part of your program as part of the CPU instructions.
Here's the assembly produced on my system with gcc
:
movl $10, -4(%rbp)
(The 4
is because an int
is 4 bytes long)
Note that all of these things are part of the implementation, but the above happens in practice. The language itself doesn't specify these details.