No Index Out of Bound Checking in C++

#include <iostream>
using namespace std;

int main() {
    const int size = 5;
    int array[size] = {1, 2, 3, 4, 5};

    // Step 1: Declare an array of integers and initialize it with values.

    // Step 2: Access elements without bounds checking.
    for (int i = 0; i <= size; ++i) {
        cout << array[i] << " ";
    }

    // Step 3: Compiler does not generate an error for out-of-bounds access.

    return 0;
}