I am trying to use
sscanf(inputCmd, "%s%d", cmd, value);
Besides the problem with
"%s" reads a space-delimited string. If there's no space between the string and the number you can't use
To find out the length of the first substring (which should be put into
cmd) and the starting position of the number, you need to iterate over the characters of the string until you find a non-alphabetic character.