vendredi 22 février 2019

What's the deal with changing pointers?

I just have a quick question on the extraneous number (1684096032) outputted to the screen. How is it possible? This may be a dumb question.

using namespace std;

int main(){
char dadum[50] = "Papa Dadi";
char* wicked = dadum;
int* baboom = (int*)wicked;
cout << baboom[1] << endl;
cout<<"Hello World";

return 0;

}

Aucun commentaire:

Enregistrer un commentaire