can you describe what this sequence is?
the code below, breaks the sequence into tokens delimited by spaces.
your description of how they are processed is confusing
A1N
c2
t120
d4
t0
b5
t0
a2
t368
e2
t452
1c
t0
e1
t600
#include <stdio.h>
#include <string.h>
char str [] = "A1N c2 t120 d4 t0 b5 t0 a2 t368 e2 t452 1c t0 e1 t600";
int
tokenize (
char *str,
char *tok [],
int maxTok )
{
char s [100];
strcpy (s, str);
tok [0] = strtok (s, " ");
int n;
for (n = 1; n < maxTok; n++)
if (NULL == (tok [n] = strtok (NULL, " ")))
break;
return n;
}
#define MAX_TOK 20
int
main ()
{
char *tok [MAX_TOK];
int n = tokenize (str, tok, MAX_TOK);
for (int i = 0; i < n; i++)
printf (" %s\n", tok [i]);
}