Q:

put pointer values in a array

I have the following part of the code: 
         i = 0;
         while (ptr != NULL)
         {
          if (i == 0)
             strcat(machine, ptr); 
          if (i == 2)
             strcat(number, ptr);
          if (i == 4)
             strcat(hr, ptr); 
          if (i == 6)
             strcat(dw, ptr); 
          if (i == 8)
             strcat(vcc, ptr);
          i++;
         }
         printf("Final: %s, %s, %s, %s, %s\n", machine, number, hr, dw, vcc);

And i have these results:
Final: 3, 34, 56, 67, 56

How can I save them in a 10 position array in the positions 5-9?
To be like that:
0 0 0 0 0 3 34 56 67 56

I wrote the following code but it is uncompleted because I do not know how to pass &machine, &number, &hr, &dw, &vcc in the table
FILE *ft = fopen("Desktop/mytext.txt","a+");
struct tm *tp;
time_t t;
char s[80];

t = time(NULL);
tp = localtime(&t);
strftime(s, 80, "%d/%m/%Y  %H:%M:%S", tp);
char table1[1][10];
for(int i = 0; i<1; i++)
{
    fprintf(ft,"%s ",s);
    for(int j = 0; j<10; j++)
    fprintf(ft,"%d ",table1[i][j]);
}

A:

Let's say you have already your values into  "machine, number, hr, dw, vcc" (who are char*)
You can't store them into your char table1[1][10] because it's a table of array who can contain only one array of 10 char.
so you neeed a char ** looking like: 
char *table1[10] = {0};

table1[5] = machine; 
table1[6] = number;
table1[7] = hr; 
table1[8] = dw; 
table1[9] = vcc;

but to display it you are going to get few problems but
you can always do something like:
for (int i = 0; i < 10; i++)
{
 if (table1[i] == NULL)
   printf("0 ");
else
   printf("%s ", table1[i]);
}
printf("\n");

But in your case why you don't simply use a int[10] ? 

