---
name: "div_t"
section: "3type"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/div_t/3type"
---

# div\_t(3type)

quotient and remainder of an integer division

## NAME

div\_t, ldiv\_t, lldiv\_t, imaxdiv\_t - quotient and remainder of an integer division

## LIBRARY

Standard C library (*libc*)

## SYNOPSIS

```
#include <stdlib.h>
```

**typedef struct {**     **int quot;** /\* Quotient \*/     **int rem;**  /\* Remainder \*/ **} div\_t;**

**typedef struct {**     **long quot;** /\* Quotient \*/     **long rem;**  /\* Remainder \*/ **} ldiv\_t;**

**typedef struct {**     **long long quot;** /\* Quotient \*/     **long long rem;**  /\* Remainder \*/ **} lldiv\_t;**

**#include \<inttypes.h\>**

**typedef struct {**     **intmax\_t quot;** /\* Quotient \*/     **intmax\_t rem;**  /\* Remainder \*/ **} imaxdiv\_t;**

## DESCRIPTION

\[\[*l*\]*l*\]*div\_t* is the type of the value returned by the \[\[**l**\]**l**\] [**div**(3)](/div/3.md) function.

*imaxdiv\_t* is the type of the value returned by the [**imaxdiv**(3)](/imaxdiv/3.md) function.

## STANDARDS

C11, POSIX.1-2024.

## HISTORY

- *div\_t* *ldiv\_t*

  SUSv1, C99, POSIX.1-2001.

- *lldiv\_t* *imaxdiv\_t*

  C99, POSIX.1-2001.

## SEE ALSO

[**div**(3)](/div/3.md), [**imaxdiv**(3)](/imaxdiv/3.md), [**ldiv**(3)](/ldiv/3.md), [**lldiv**(3)](/lldiv/3.md)
