How can I get specific length of integer value from user? I have a piece of code for creating user account in C. Which requires `char user_name[30]` and 4-digits of `int pin`. I want to confirm that user has entered 4 digits of pin other wise give an error to the user. How can I do this?