| Average in C++ |
For scanf, you must get & in the right places.
Generally, compilers cannot check this.
At most a warning.
Extra arguments are just ignored.
Extra % specifications apply to junk following the arguments.
Extra % specifications in scanf use that junk as memory addresses.
Type mis-match can be very interesting.
Typically leads to run errors with opaque messages.
| Average in C++ |