I have a 2D array called char **str
(allocated by malloc). Lets say str[0] has the string "hello". How would I print that hex?
I tried printf("%d\n", (unsigned char)strtol(str[0], NULL, 16))
, but that doesn't print it out in hex.
Any help would be appreciated, thank you!