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 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
Passing two references to the same object in strtoul
The following code runs well under gcc 11.2.1:
// test.c
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char **argv){
char *msg;
unsigned int val;
msg = "1024 2...
onlycparra
Votes: 0
Answers: 1
Cannot convert string to unsigned long in C
I convert string to unsigned long like this code.
String t = "1667451600";
unsigned long ret;
ret = strtoul(t,NULL,10);
It show error like this.
test:122:19: error: cannot convert 'String' ...
user58519
Votes: 0
Answers: 1
Is it possible to read character array elements into a struct using ```strtoul``` in C?
I'm working on a project for a class and I could use some guidance. I need to parse a character array into constituent parts - the specifications of which I am given - but I am unsure how to do so in ...
Natalia Hassan
Votes: 0
Answers: 1