1.size_t
size_t is an unsigned integer type, which is the type of the sizeof operator result. If the device has an address space of 32 bits, this is a 32-bit unsigned integer, and if the device's address space is 64 bits, this is a 64-bit unsigned integer. In other words, a variable of type size_t can safely hold a pointer (the only exception is a pointer to a class function). size_t are typically used for loop counters, array indexes, and address arithmetic.
2.ptrdiff_t
Ptrdiff_t is a signed integer type, which is the type of two pointer subtraction results. If the device has an address space of 32 bits, this is a 32-bit signed integer, and if the device's address space is 64 bits, this is a 64-bit signed integer. As with size_t, ptrdiff_t can safely store pointers other than class function pointers.
The size of the size_t and Ptr_diff is always the same size as the pointer, so it is suitable for indexing large arrays, storing pointers, and pointer operations.
3.intptr_t
Signed integer type, which has a property, any legal pointer to void can be converted to this type, and then can be converted back to a pointer to void, the result is equal to the original pointer comparison.
4.uintptr_t
An unsigned integer type that has a property that any legitimate pointer to void can be converted to that type, and can then be converted back to a pointer to void, with the result being equal to the original pointer comparison.
size_t/ptrdiff_t/intptr_t/uintptr_t