Can anyone explain me how this code results 16843009? How it works?
As I saw in my tests, (int *)&x results 0x61ff1b and as I know that is the address of the first element in the array. and how the result of *(int *)&x is 16843009? Thanks.
#include <iostream>
using namespace std;
int main()
{
char x[5] = {1, 1, 1, 1, 1};
cout << *(int *)&x;
return 0;;
}