I have the following code:
#include
int main()
{
printf(\"The \'int\' datatype is \\t\\t %lu bytes\\n\", sizeof(int));
printf(\"The \
Technically, you have undefined behaviour due to mismatched format and data types.
You should use %zu for the type associated with sizeof (which is size_t).
For example:
printf("The 'int' datatype is \t\t %zu bytes\n", sizeof(int));
This is particularly important if you intend to target both 32 and 64 bit platforms.
Reference: http://en.cppreference.com/w/c/io/fprintf