I am getting this warning when i compile your source file:
warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
As far as i know the problem is that "You are my dreams " is a unnamed string constant (i.e. there is no variable which you can use to access the string). I guess the memory that is needed to store the string constant is de-allocated right after line 11 in your code, which results in unpredictable behaviour of your program (depending on compiler).
To solve this problem you can omit the char* d variable:
1 2 3 4 5 6 7 8 9
strcpy(s, "You are my dreams ");
cout << s;
cout << " Hellow" << endl;
The string is not deallocated. It stays there for the whole run of the program. The warning you get is because he uses a non-const pointer to point to data that should not be modified. The correct thing to do is to make d a constchar*.
He doesn't need to use dynamic allocation. If you want to use dynamic allocation you should at least allocate an array that is big enough to hold the string. Now you are only allocating a single char.
I don't see why you would get that output. Are you sure you use the exact same code on both systems?