How to convert str "0xfa" to int 0xfa, str "0x5c" to int 0x5c ?
My code:
#include <stdio.h>
#include <string.h>
int main(){
char a[]="0xfa";
char b[]="0x5c";
int c=a;
int d=b;
//i have to get c to be 0xfa,and d to be 0x5c
printf("%c%c\n",(char)c,(char)d);
return 1;
}