Go to the first, previous, next, last section, table of contents.


Input and Output Functions

Functions that perform input from a stdio stream, and functions that output to a stdio stream. Passing a NULL pointer for a stream argument to any of these functions will make them read from stdin and write to stdout, respectively.

When using any of these functions, it is a good idea to include `stdio.h' before `gmp.h', since that will allow `gmp.h' to define prototypes for these functions.

Function: size_t mpq_out_str (FILE *stream, int base, mpq_t op)
Output op on stdio stream stream, as a string of digits in base base. The base may vary from 2 to 36. Output is in the form `num/den' or if the denominator is 1 then just `num'.

Return the number of bytes written, or if an error occurred, return 0.


Go to the first, previous, next, last section, table of contents.