Contact: aviboots(AT)netvision.net.il
39,971 questions
51,913 answers
573 users
#include <stdio.h> #include <string.h> int main(void) { char s[] = "3.14"; char *part; part = strtok(s, "."); while (part != NULL) { printf("%s\n", part); part = strtok(NULL, "."); } return 0; } /* run: 3 14 */
#include <stdio.h> #include <string.h> int main(void) { char s[] = "3.14"; char *part; part = strtok(s, "."); printf("%s\n", part); part = strtok(NULL, "."); printf("%s\n", part); return 0; } /* run: 3 14 */