Unnamed
public c v1 · immutable#include <stdio.h>#include <stdlib.h>#include <string.h>int main(int argc, char *argv[]) { char buf[256]; char ptr[256]; char *x, *y; strcpy(buf, "test string 1"); strcpy(ptr, "some,comma,delimited,values"); for (x = strtok(buf, " "); x; x = strtok(NULL, " ")) { printf("x is [%s]\n", x); for (y = strtok(ptr, ","); y; y = strtok(NULL, ",")) { printf("y is [%s]\n", y); } }}