我有字符串"6A"我怎么能转换成十六进制值6A?
请帮我解决C语言的问题
我试过了
char c[2]="6A"
char *p;
int x = atoi(c);//atoi is deprecated
int y = strtod(c,&p);//Returns only first digit,rest it considers as string and
//returns 0 if first character is non digit char.
Run Code Online (Sandbox Code Playgroud)