## FPRINTF Formated File Output Function (C-Style)

Section: Input/Ouput Functions

### Usage

Prints values to a file. The general syntax for its use is

      fprintf(fp,format,a1,a2,...).

or,

      fprintf(format,a1,a2,...).

Here `format` is the format string, which is a string that controls the format of the output. The values of the variables `ai` are substituted into the output as required. It is an error if there are not enough variables to satisfy the format string. Note that this `fprintf` command is not vectorized! Each variable must be a scalar. The value `fp` is the file handle. If `fp` is omitted, file handle `1` is assumed, and the behavior of `fprintf` is effectively equivalent to `printf`. For more details on the format string, see `printf`.

### Examples

A number of examples are present in the Examples section of the `printf` command.