This is possibly a very easy question, but most of my experience is in C# and not plain C.
I have a data file I created using a C# program, with a list of 64-bit integers (type long in C#). I want to read them into a C program. There's some other math that needs to be done to create more 64-bit integers as well.
However, it seems that either the type long in C is only giving me a 32-bit integer or I'm really messing up my displays. The latter is quite possible. What code would I use in printf to display it?
As a specific example, I set a variable of type long equal to 2*2^32, then displayed it with printf using %u (is this the right one?). It displayed 2147483648 (which is 2^31). Do I need to use a different data type than long, or is my problem just in my printf?