int main()
{
    char *str = new char[12];
    delete [] str;
    
    char *test = new char[12];
    strcpy(str, "surprise !");
    cout << test << str;
    delete [] test;
 
}

What is the reason behind same o/p for both pointers, though test is 
not copied with any data?

Reply via email to