fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. const char* x = "hello";
  7. char y[5];
  8. strncpy(y, x, strlen(x));
  9. printf("%d\n", strlen(x));
  10. printf("%s", y);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 5376KB
stdin
Standard input is empty
stdout
5
hello