Here's the piece of code
long int lValue = 9999999999999; cout << lValue << endl; I am running it on Eclipse IDE for C/C++, using MinGW compiler.
I have include the #include <limits.h> properly and other sort of short and unsigned int are being compiled and showing a value properly.
But while running this long int value, I am getting the following value. 1316134911 instead of the original value, I tried it with different values but each time it's getting a random value. Any more details required? let me know, thanks in advance!
long intis the same asint. You needlong long...9999999999999LLSee also stackoverflow.com/questions/586118/…