#include using namespace std; int main() { int arr[10] = {1, 2, 3, 4, 5}; // Initial array int n = 5; // Current size of array int pos = 2, value = 10; // Insert 10 at index 2 // Shift elements to the right for (int i = n; i > pos; i--) { arr[i] = arr[i - 1]; } arr[pos] = value; // Insert the element n++; // Increase size // Print updated array for (int i = 0; i < n; i++) { cout << arr[i] << " "; } return 0; }