sprintf dev c code example
Example 1: sprintf
char myConcatenation[80];
char myCharArray[16]="A variable name";
int myInt=5;
sprintf(myConcatenation,"%s = %i",myCharArray,myInt);
Serial.println(myConcatenation);
Example 2: sprintf C
#include <stdio.h>
#include <math.h>
int main () {
char str[80];
sprintf(str, "Value of Pi = %f", M_PI);
puts(str);
return(0);
}