Well, it kind of depends on what kind of format the data being read is in. Are the types at least known? Can the data all be thrown into an array or does each value have to have its own variable (impossible)?
If you're just looking to store each value in a string like "13:27:8:41:75" but you don't know beforehand how many values there are it's pretty simple.
Code:
itsme:~/C$ cat vals.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char *string = "13:27:8:41:75", *p = string;
int *vals = NULL, nvals = 0;
int i;
do
{
if(*p)
{
if(*p == ':')
p++;
// Should check to make sure memory was allocated successfully
if(nvals)
vals = realloc(vals, sizeof(int)*(nvals+1));
else
vals = malloc(sizeof(int));
vals[nvals++] = atoi(p);
}
} while((p = strchr(p, ':')));
for(i = 0;i < nvals;++i)
printf("%d\n", vals[i]);
free(vals);
return 0;
}
itsme:~/C$ ./vals
13
27
8
41
75
itsme:~/C$