I was born in the modern world, so I don't often need to deal with this sort of thing, but could someone explain how to get the correct number in the following code. Here is one attempt of many:
#define X 2527
#define Y 2463
#define Z 3072
main()
{
long int c = X*Y*Z;
printf("%ld",c);
}
I'm just trying to print a long integer but it is always printing the wrong result. Am I getting integer overflows - if so how can I prevent them? Or is it my choice of printf formatter?