fprintf() STDIO fprintf() Print formatted output into file stream int fprintf(fp, format, [arg1, .... argN]) FILE *fp; char *format; [data type] arg1, ... argN; fprintf formats and prints a string. It resembles the function printf, except that it writes its output into the stream pointed to by fp, instead of to the standard output. fprintf uses the format to specify an output format for arg1 through argN. See printf for a description of fprintf's formatting codes. ***** Example ***** For an example of this routine, see the entry for fscanf. ***** See Also ***** printf(), sprintf(), STDIO ***** Notes ***** Because C does not perform type checking, it is essential that an argument match its specification. For example, if the argument is a long and the specification is for an int, fprintf will peel off the first word of that long and present it as an int. At present, fprintf does not return a meaningful value. COHERENT Lexicon Page 1