You know that by knowing about your compiler... in my compiler int is 32 bits... I know this and I can trust it.
If your compiler's library includes stdint.h you can be very explicit about variable sizes... for example int32_t guarantees a 32 bit integer.
If you are concerned about the user's entry overflowing the integer's range... you need to limit your user's input to acceptable values (almost always a necessity in real world programming, anyway)... There are a great many ways of doing this but in a training exercise it's safe to make a note to work on this later (once your more familiar with the language)