// simple program that shows a classic type error where an array of char is // reinterpreted as an int that we double #include using namespace std; int main() { cout << "hello world" << endl; char text[4]; text[0] = 'f'; text[1] = 'u'; text[2] = 'n'; text[3] = '\0'; int * p = (int *) &text; cout << text << endl; cout << *p << endl; *p *= 2; cout << text << endl; cout << *p << endl; return 0; }