June 15th, 2003, 09:48 PM
Getting a String object containing hexadecimal representation of a char
the problem is i want to get hexadecimal representation of contents of a 'char' variable in String format.
char ch = 127;
its hexadecimal representation is '7F'
How to get a string objet which have this hexadecimal representation?
thanks in advance
June 15th, 2003, 11:49 PM
int main(int argc, char **argv)
char x = 'A';
char y = " ";
y = x;
printf("value of y after copying x into it: %s\n",y);
printf("value of y after copying hex value of x into it: %s\n",y);
<oo7:Sun Jun 15> ./x
value of y after copying x into it: A
value of y after copying hex value of x into it: 41