Does an Integer variable in C occupy 2 bytes or 4 bytes? What are the factors that it depends on?
Most of the textbooks say integer variables occupy 2 bytes. But whe
#include int main(void) { printf("size of int: %d", (int)sizeof(int)); return 0; }
This returns 4, but it's probably machine dependant.