Almost everyone know about sizeof operator in C and its use .mostly you have used or noticed passing arguments in functions like mallo() or memcpy().. In simple terms, it provides the size of an object and its syntax looks like “sizeof(object)” ..
sizeof() provides its return in “size_t” form.
In gnu C library environments, this is an unsigned int or unsigned long int data type.. So when using format specifier inside printf to print the size of an object, try to cast to (unsigned long) ..
For ex:
printf("%lu", (unsigned long)sizeof(thetype));