May I suggest you indent your source code? It helps dramatically with source code readability . . .
Code:
#include <stdio.h>
int main() {
int input;
int first, second, third, fourth, fifth;
printf("Enter your digit: ");
scanf("%d", & input);
printf("\n");
first = input % 10;
second = (input % 100)/10;
third = (input % 1000)/100;
fourth = (input % 10000)/1000;
fifth = (input % 100000)/10000;
printf("first: %d", first);
printf("second: %d", second);
printf("third: %d", third);
printf("fourth: %d", fourth);
printf("fifth: %d", fifth);
return 0;
}
And yes, as previously mentioned, old compilers (such as Turbo C) and old platforms (such as the 8086) had a maximum range for ints of -32,768 to 32,767 (32-bit platforms and compilers usually have a range of -2,147,483,647 to 2,147,483,648, some 64-bit platforms may define the long type to be from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807).
If you are using a compiler old enough to have the int type as 16 bits, then I strongly suggest you find another compiler.