fork download
  1. #include <stdio.h>
  2. //#include <iostream>
  3. //using namespace std;
  4.  
  5. int main() {
  6. char *str = "hello";
  7. void *add = 0;
  8.  
  9. add = str;
  10. printf("str=%s\t",str);//cout << str << "\t"
  11. printf("str=%s\n",add);// << add << endl;
  12.  
  13. str = "world";
  14. add = str;
  15. printf("str=%s\t",str);//cout << str << "\t"
  16. printf("str=%x",add);//<< add << endl;
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 4120KB
stdin
Standard input is empty
stdout
str=hello	str=hello
str=world	str=1e32f7ca