fork download
  1. #include <string.h>
  2. #include <iostream>
  3.  
  4. int main() {
  5. char b[5] = "aaaa";
  6. const char* a = "bbbb";
  7.  
  8. std::cout << b << std::endl;
  9. memcpy(b, a, strlen(a));
  10. std::cout << b << std::endl;
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
aaaa
bbbb