print(size_t) Format (You Need to Know)

%d is the output numerical integer
The size_t in the warning is unsigned int.
Change %d to %zu and there will be no warning.

The difference between size_t and int is
size_t is defined by some C/C++ standards in stddef.h. This type is sufficient to represent the size of an object. This type is sufficient to represent the size of an object.
The true type of size_t is operating system dependent and is commonly defined in 32-bit architectures as.
typedef unsigned int size_t;

and in the 63-bit architecture is defined as.
typedef unsigned long size_t. size_t is 4 bytes on 32-bit architectures and 8 bytes on 64-bit architectures;
size_t is 4 bytes on 32-bit architectures and 8 bytes on 64-bit architectures, so be careful when compiling on different architectures.
int is 4 bytes in different architectures.
int is a signed book, size_t is an unsigned number.

Read More: