1ptrdiff_t(3type)                                              ptrdiff_t(3type)
2
3
4

NAME

6       ptrdiff_t - count of elements or array index
7

LIBRARY

9       Standard C library (libc)
10

SYNOPSIS

12       #include <stddef.h>
13
14       typedef /* ... */  ptrdiff_t;
15

DESCRIPTION

17       Used  for  a count of elements, or an array index.  It is the result of
18       subtracting two pointers.  It is a signed integer type capable of stor‐
19       ing values in the range [PTRDIFF_MAX, PTRDIFF_MAX].
20
21       The  length  modifier  for ptrdiff_t for the printf(3) and the scanf(3)
22       families of functions is t, resulting commonly in %td or %ti for print‐
23       ing ptrdiff_t values.
24

STANDARDS

26       C11, POSIX.1-2008.
27

HISTORY

29       C89, POSIX.1-2001.
30

SEE ALSO

32       size_t(3type)
33
34
35
36Linux man-pages 6.05              2023-03-30                  ptrdiff_t(3type)
Impressum