Scanf with support for %s (with length) and %d.