What is the difference between scanf, gets and fgets (and others?) in terms of efficiency? Example case: imagine reading in a list of several thousand integers (per line)
This question has been asked more often, but everyone always responds by mentioning buffer overflows (eg: here), so to clarify why my question is not in fact a duplicate: I know and do not care about buffer overflows. The setting in which I would apply these methods are in competitive programming, where I know exactly what the input looks like and even when the input is not as expected (ie. leading to buffer overflows) it's not my problem.