Thank you very much. Indeed 4E31 = 20017 decimal not 45543, as I just wrote it arbitrarily (I should put it the right way I guess).
I have tried using bitwise shift operator and it worked.
thank you very much for your help guys.
donbock - yes you are right. that's another thing that I need to consider
User Profile
Collapse
-
Thank you for your reply. I do appreciate that.
1. I could use sprintf as you suggested, but that's not the real intention since I will be still getting '314E'.
2. However, my intention was this:
- i m reading from a data file.
- the data consists of only two bytes of data (two characters i.e N1 followed
by the next data i.e 5T) and so forth.
- I want to get the difference...Leave a comment:
-
how to manipulate itoa
this is my code:
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int j;
char str[33];
printf ("Enter a character: ");
scanf ("%2c",&j);
flushall();
itoa (j, str, 16);
printf ("hexadecima l: %s\n", str);
getchar();
getchar();...
No activity results to display
Show More
Leave a comment: