12345678910
// Assign -1 to the last 3 elements for (int i = 3; i < 6; i++) { numarray[i] = -1; } // display all elements for (int i = 0; i < 6; i++) { std::cout << numarray[i] << " "; }