Read it into a character array like this . . .
(note that some of this is invalid, but changed for easier reading)
Code:
char number[1024];
scanf("%s", number);
/* and now you've got a nice, shiny array of characters that represent the number */
/* check that they're all numbers . . . */
int x;
int valid = 1;
if(number[0] == '-' || isdigit(number[0]) {
for(x = 1; x < strlen(number); x ++) {
if(!isdigit(number[x])) { valid = 0; break; }
}
}
else valid = 0;
/* and there you have it. */
Note that you could use something more like the GMP if you really wanted to.