int main()
{
    int array[10];
    memset(array, INT_MIN, sizeof(array));
    cout << INT_MIN << endl;
    for (int i = 0; i < 10; i++)
        cout << array[i] << endl;
    system("pause");
}
Just like that, when I using "memset(array, -1, sizeof(array))", I will get correct result. However, when I using INT_MIN instead of -1, all the outputs are 0, but the INT_MIN should be -2147483648: outputs: results image
 
     
    