Hello Friends, I am exploring the below sketch to concatenate arrays.. If I want to add "%" symbol to the end of the integer value to myConcatenation[80] array, how do I do it? basically, when I print myConcatenation, I would like to see the output as "A variable name = 5 %.
Any guidance is appreciated.
void setup() {
Serial.begin(115200);
}
void loop() {
char myConcatenation[80];
char myCharArray[16]="A variable name";
int myInt=5;
sprintf(myConcatenation,"%s = %i",myCharArray,myInt);
Serial.println(myConcatenation);
delay(100);
}