The output for this C++ program is: megaihfrium . Could someone explain how the program got that output, please? Detail please?
#include <iostream>
using std::cout;
int main()
{
char str[] = “megatherium”;
char *ptr0, *ptr1;
ptr0 = &str[8];
ptr1 = ptr0 – 4;
*ptr1 = *ptr0;
ptr0 = ptr0 – 3;
ptr1 = ptr0 + 1;
*ptr1 = (*ptr0) – 2;
cout << str;
}