Actually, it is just after args[1] received a pointer to "2" that the first for-loop terminates prematurely. strtok() definitely returned "2" and that was definitely stored into args[1], but the first for-loop failed to keep looping for what should have been another two calls to strtok().