fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6. char* mem = new char[5];
  7.  
  8. auto value = (char(&)[5])mem;
  9. value = "1234";
  10. printf("%s", value);
  11.  
  12. delete mem;
  13. }
Success #stdin #stdout 0s 2960KB
stdin
Standard input is empty
stdout
1234