char line[255]; char *token = NULL; char *line2 = NULL; char *temporaryToken = NULL; if( scanf(\" %[^\\n]\", line) > 0) token = strtok( line, \";\" ); //divide t
strtok modifies the original string. If you want to mix calls like that, you either need to make a copy or use strtok_r.
strtok
strtok_r