fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. char buffer[3];
  6. int r = snprintf(buffer, sizeof(buffer), "%s", "abc");
  7. printf("%d (%d %d %d)\n", r, buffer[0], buffer[1], buffer[2]);
  8. }
  9.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
3 (97 98 0)