J
John L.
I've seen several postings asking this, but no simple, clear answer. My
C language reference book is deficient in this area.
If I
short i = 0;
printf(">%2x<",i);
I might resonably expect the following output:
Now, what format code (%?? below) will restore i's value? e.g.
short i;
char s[5];
strcpy(s,"0000");
sprintf((char *)&i,"%??",s);
if (i==0) printf(">Hexed again<");
Produces:
Thanks in advance
C language reference book is deficient in this area.
If I
short i = 0;
printf(">%2x<",i);
I might resonably expect the following output:
>0000<
Now, what format code (%?? below) will restore i's value? e.g.
short i;
char s[5];
strcpy(s,"0000");
sprintf((char *)&i,"%??",s);
if (i==0) printf(">Hexed again<");
Produces:
>Hexed again<
Thanks in advance