python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How do u make strtol convert 0
void isInt(char *string)
{
if (strlen(string) > 2)
printf("Invalid")
if (!strtol(string, &endptr, 10))
printf("Invalid")
printf("Valid&quo...
Vikil Chandrapati
Votes: 0
Answers: 2
How can I convert hex encoded string to string in C efficiently
I need to convert hex encoded string like this:
char hstr[9] = "61626364"; // characters abcd\0
Into
"abcd" // characters as hex: 0x61 0x62 0x63 0x64
// hex "digits&qu...
Kamil
Votes: 0
Answers: 5
Proper end pointer with strtol() and "0x"?
strtol("0x", &endptr, 16);
This completes with endptr pointing to "0x". I expected "x". Is my C library's strtol() amiss, my expectations or something else?
The &quo...
chux - Reinstate Monica
Votes: 0
Answers: 0