The type ldiv_t is defined in the <stdlib.h> header file as follows: typedef struct { long quot, rem; } ldiv_t; See also div.