Pradeep Channagiri
Newbie level 3
- Joined
- Mar 31, 2015
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 25
i have some ascii characters in a char variable.ex - char buf[100]="ab*(z&";
So each of the char in that char array will have some hex value.ex- *'s hex value is '2a'.
And i have a long long int variable in which there is a 64 bit hex value.
ex- long long int k=0x0000888888888888;
Now i want to subtract the char buff's hex value in k.How to accomplish it.please help.
That is 0x0000888888888888
- 0x000061622a287a26
= 0x000027265e600e62 (final result in a buffer or a long variable is okay)
Later i want to reverse the result as 26e006e56272.It should be stored in a variable such that i should be able to access each byte from it(ex- '72'(last 2 hex digits)).
Am stuck in this part in a very big project from Harman technologies.Please do help.
Thank You in advance.
So each of the char in that char array will have some hex value.ex- *'s hex value is '2a'.
And i have a long long int variable in which there is a 64 bit hex value.
ex- long long int k=0x0000888888888888;
Now i want to subtract the char buff's hex value in k.How to accomplish it.please help.
That is 0x0000888888888888
- 0x000061622a287a26
= 0x000027265e600e62 (final result in a buffer or a long variable is okay)
Later i want to reverse the result as 26e006e56272.It should be stored in a variable such that i should be able to access each byte from it(ex- '72'(last 2 hex digits)).
Am stuck in this part in a very big project from Harman technologies.Please do help.
Thank You in advance.