3 ms·
> (Note: Avoid using printf when printing parameters, as the parameter may contain a % which would be interpreted by printf as a conversion specifier. The progr
by _pmf_ 9y ago
> (Note: Avoid using printf when printing parameters, as the parameter may contain a % which would be interpreted by printf as a conversion specifier. The program may crash with a bizarre error, such as "runtime error R6002 - Floating point not loaded".)
It would be safe to use
printf("arg[%d] = %s", i, argv[i]);
- delinka 9y agoIt should say: Avoid using user input as your format string. Never pass command line parameters as the format argument to the printf family of functions.