How to add a number to a CHAR

As tittle says
how to add a number to a CHAR

Say if I have this:

char* someString = "someCharacters";

and want to add at the end number 10 to get

someString = "someCharacters10";

strcat() or sprintf()

The someString string must be large enough to hold the result. Don't forget the terminating null character.

Convert the number 10 to the string "10" using itoa().

combine them using strcat().

Note that we are talking about strings not Strings.

@groundFungus

Thank you!

It is much better to point to, then to explain. I learned a lot.

char s [20];
int    val = 10;
sprintf (s, "someCharacters%d", val);

You should avoid low level c-string functions as they easily cause errors if you don't get the sizes correct or forget the terminating '\0'
Try my SafeString library (from the Arduino library manager) (detailed tutorial here) It provides the functionality of Arduino Strings without the memory fragmentation and other odd errors.

  char s [20];
  int    val = 10;
  cSFA(sfStr, s);
  sfStr = "someCharacters";
  sfStr += val;
  Serial.println(sfStr);

The advantage of SafeString shows when you decide to add more text,

  char s [20];
  int    val = 10;
  cSFA(sfStr, s);
  sfStr = "someCharacter extra";
  sfStr += val;
  Serial.println(sfStr);

The output for this is

Error: sfStr.concat() needs capacity of 21 for the first 2 chars of the input.
        Input arg was '10'
        sfStr cap:19 len:19 'someCharacter extra'
someCharacter extra

Using SafeStrings catches and prevents buffer overruns and avoids the memory fragmentation of Arduino Strings