Here is a simple example using fgets, strtok and atoi. (since your input only uses small ints, atoi will work fine.) Be sure to edit the file path at the top.
Note: this is just a quick and dirty example, i.e. numbers is hardcoded to only hold 100 values, the line buf is hardcoded to only hold a line 259 characters + 1, etc, etc. If you want to make it more flexible (bigger files, more numbers), use calloc();
and free();
to create and free memory as you need it.
#include <ansi_c.h>
int main(void)
{
FILE *fp;
char *tok;
int numbers[100];
char tempBuf[5], lineBuf[260];
int i=0;
memset(numbers, 0, sizeof(numbers));
fp = fopen("C:\\dev\\play\\numbers.txt", "r");
while(fgets (lineBuf, sizeof(lineBuf), fp))
{
tok = strtok(lineBuf, " \n");
while(tok)
{
strcpy(tempBuf, tok);
numbers[++i] = atoi(tempBuf);
tok = strtok(NULL, " \n");
}
}
fclose(fp);
}