Hi all,
Presently I am learning c.
I am surprised and confused by the following code out put.I am using 32 bit machine, cc compiler.
I am getting the following errorCode:#include <stdio.h> int main () { int x = 2147483648; printf ( "x = %d\n", x ); return 0; }//main
"decimal constant is so large that it is unassigned"
Then i tried with different options like unassigned int x, long int x, long x,
every time I am getting the same error message!
Lastly i tried with double x = 2147483648;
I am getting same error message??But when I add zero /zeros I am getting the out pot.
for example if I give like double x = 214748364800;
i am getting out put.
Please note that if i give x = 2147483647; (only diffrence is last digit), I am getting the correct out put in the different data types?
What was the wrong with it?
Regards
Chandu