ariyan
Member level 5
'C' help needed
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;
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 in a into c and d, which is not a problem in case of storing that value into 'b'.
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;
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 in a into c and d, which is not a problem in case of storing that value into 'b'.