The pointer size also depends on the architecture. Developers often need to address the elements of arrays, and, since arrays are internally represented as pointers, the offset representation depends on the pointer's size.
For example, in a 32-bit system, pointers are 32-bit, the same as int. However, in a 64-bit system, the size of int is still 32-bit, while pointers are 64-bit.
size_t is a special data type since it represents offset and data sizes in an architecture-independent way.
In this recipe, we will learn how to use size_t when working with arrays.