Since putwc might be implemented as a macro, a file pointer argument with side effects (for example putwc (wc, *f++)) might be evaluated incorrectly. In such a case, use the fputwc function instead. See also fputwc.