sizeof
returns size_t
type. Use %zu
specifier to print the value of sizeof
.
printf("\nThe Size Of Integer A Is = \t%zu", sizeof(a));
C11 6.5.3.4 The sizeof
and _Alignof
operators:
5 The value of the result of both operators is implementation-defined, and its type (an
unsigned integer
type) issize_t
, defined in<stddef.h>
(and other headers).
NOTE: As loreb pointed out in his comment that when you will compile your code in Windows, then most probably you will get the warning like:
[Warning] unknown conversion type character 'z' in format [-Wformat]
[Warning] too many arguments for format [-Wformat-extra-args]