fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. char word1[100] = "abcd\0" ;
  6. char word2[10] = "\0" ;
  7.  
  8. printf( "%s\n%s\n", word1 , word2 ) ;
  9. strcpy( word1 , word2 ) ;
  10. printf("%s", word1 ) ;
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
abcd