/* strtok example */ #include #include #include #include int main () { char str[100]; char * pch; int a,b; pch = strtok (str," "); gets(str); while (pch != '\0') { a=atoi(pch); pch = strtok ('\0', " "); b=atoi(pch); break; } printf ("%d\n",a); printf ("%d",b); getch(); return 0; }