+ 4
sizeof(argument) function returns the size of memory allocation of its argument, which can be really big integer but always positive i.e. long unsigned int. For example, an array with lots of elements can have really big size. So you should use %ld (long int) or %lu (long unsigned int). But for your case, you can just use %d. Although the compiler will through some warning messages at you.
4th Mar 2021, 2:22 AM
Abir Hasan
Abir Hasan - avatar