fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int quantidade = 12;
  6. char id[3] = "p";
  7. char novoId[10];
  8.  
  9. snprintf (novoId, 10, "%s%d", id, quantidade );
  10. printf("%s", novoId);
  11. return 0;
  12. }
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
p12