R
Roopa
Hi,
Is there anything wrong with this code ?
#include <stdio.h>
int main()
{
int i=32999;
printf ("\n%d\n", i);
return 0;
}
According to <limits.h>
* maximum value for an object of type int
INT_MAX +32767.
Now that i have crossed in my code does it invoke any UB.
Also since on my m/c int is 4 bytes i believe max value i can store
is 0xffffffff, So essentially an unsigned int can hold (4294967295)
Correct me if i am wrong. So whats is the use of INT_MAX..(or similar
for other objects) defined in the standard.
Thanks
Is there anything wrong with this code ?
#include <stdio.h>
int main()
{
int i=32999;
printf ("\n%d\n", i);
return 0;
}
According to <limits.h>
* maximum value for an object of type int
INT_MAX +32767.
Now that i have crossed in my code does it invoke any UB.
Also since on my m/c int is 4 bytes i believe max value i can store
is 0xffffffff, So essentially an unsigned int can hold (4294967295)
Correct me if i am wrong. So whats is the use of INT_MAX..(or similar
for other objects) defined in the standard.
Thanks