I have a case where I\'m not sure if I\'ll get enough input for sscanf
. Can I safely assume that sscanf
won\'t mess with any argument that it doesn
From http://pubs.opengroup.org/onlinepubs/009695399/functions/scanf.html:
... If the format is exhausted while arguments remain, the excess arguments shall be evaluated but otherwise ignored.
Edit: As Kerrek correctly noticed, the above statement does not apply here.
It is about sscanf("1", "%d", &a, &b, &c)
, and not about
sscanf("1", "%d %d %d", &a, &b, &c)
as in the question.