C examples for stddef.h:ptrdiff_t
data type
<cstddef>
Result of pointer subtraction
#include <stdio.h> #include <stddef.h> int main ()//from ww w . jav a2 s .com { int i = 0; int j = 2; int* p1 = &i; int* p2 = &j; ptrdiff_t p = p2 - p1; printf ("%u\n",p); return 0; }