fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int s = 5;
  5. int n = 4;
  6.  
  7. char myString[10];
  8. printf("%d%d", s, n); // you can't add l to g here!
  9.  
  10. sprintf(myString, "%d%d", s, n); // myString is now "54"
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
54