How to store a 64 bit value into 2 unsigned long variable (of 32 bit)?
Let,
:
unsigned long a; // variable 'a' will be incremented regularly and 'll be stored in b
void fun(void)
{
unsigned long double b; // It may be a global variable
b += a; // if b is a 64 bit variable ,
// regular addition of 'a' into 'b' will increase the value greater than 32 bit
};
Now instead of using variable b of using 64 bit, I have to use two unsigned long variable(let c, d of 32 bit each) and store the value into 'c' and 'd', which is not a problem in case of storing that value into 'b'.
If you provide the answer using 4 unsigned integer (16 bit each) variable, it is also somhow acceptable.
Note: a' is a global variable. and 'c' and 'd' 'll also be global.
Thanks to all.