+ 1
Size of int is 2 or 4
C programming
3 Réponses
+ 3
It depends.
Run this code to be sure:
printf("%d",(int)sizeof(int));
+ 2
ARAVINDH ARAVINDH size of int is compiler dependent or more appropriately processor dependent. If you are using a 16bit machine than it is 2 Bytes
If you are using a 32 or 64 bit machine than it is 4 bytes.
Best way is to use sizeof(int) to find the actual size on your system
+ 2
It depends kn complier. You can check it by using sizeof(int).