Nonetheless, it is still arbitrary, and it is probably a mistake to use i without further assignment if scanf fails. The correct approach to handling such an input error is not to check if i still...
Type: Posts; User: laserlight
Nonetheless, it is still arbitrary, and it is probably a mistake to use i without further assignment if scanf fails. The correct approach to handling such an input error is not to check if i still...
If there is no correct initial value at that point, then there is no correct initialisation (or any initialisation, or no initialisation, is correct). The appropriate solution is to declare the...
The original post contain getchar -- which is standard -- not getch.
That is only true if the value used in the initialisation is intended. Otherwise, one invalid value is as bad as another...