convert char array into a integer in c function code example
Example 1: char array to int c
char myarray[5] = {'-', '1', '2', '3', '\0'};
int i;
sscanf(myarray, "%d", &i);
Example 2: char array to int c
char *string = "-123";
int i = atoi(string);