Keil Logo

ptrdiff_t

The prtdiff_t type is defined in stddef.h. This type specifies the signed integer result of subtracting two pointers. It is defined as:

typedef int ptrdiff_t;

and is used as shown in the following example:

#include <stddef.h>

void pfunc (void *p1, void *p2) {
  ptrdiff_t pdiff;

  pdiff = p1 -p2;
}
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.