I'm trying to convert two integers into strings, concatenate them, and convert the result back to an integer. I'm not sure the best way to do this. I tried using sprintf but it didn't work and the characters were null when I printed them out.
Here are the relevant parts of the code:
alt_u8 high_digit, low_digit;
char high_digit_char, low_digit_char, full_value_char;
sprintf(high_digit_char, "%d", high_digit);
sprintf(low_digit_char, "%d", low_digit);
sprintf(full_value_char, "%s %s",high_digit_char, low_digit_char);
full_value = atoi(full_value_char);