Hello everyone.Im having some problem understanding whats going on here ...
This code
Gives an output of 5 .. no problemoCode:unsigned char x; x=-5; printf("%d",x);
but
prints out -5 ... why ?Code:unsigned int x; x=-5; printf("%d",x);
As for my 2nd question,
The compiler is generating a warning :Code:long long x = 18232323232322; printf("%d",x);
[Warning] integer constant is too large for "long" type and printing a value of 187060802.
Im on a 32-bit machine and using Dev C++ 4.9.9.2 , where the long long int is supported and is in the range –9,223,372,036,854,775,807 to 9,223,372,036,854,775,807.
Thank you.



LinkBack URL
About LinkBacks



