After compiling and linking your executable contains multiple segments. Two type of these segments are:
- text segments - containing the actual code
- data segments - containing static data.
(there are other types as well)
The value 10 is either stored in the text segment (as an instruction to set 10 to a specific address or register), or stored as data in the data segment (which is retrieved by the code and stored at the specific address/register).
The compiler decides what is best (most efficient for the given compilation flags). But I suppose it is 'stored' in a text segment as the value 10 is quite simple to 'create in code' (as shown by some of the other answers).
More complex data (structs, strings, etc.) are typically stored in a data segment.