Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
using namespace std; int main() { int myNumbers[6] = {10, 20, 30, 40, 50, 60}; cout << "Before:\n"; for (int i = 0; i < 6; i++) { cout << myNumbers[i] << " "; } memmove(&myNumbers[0], &myNumbers[2], 4*sizeof(myNumbers[0])); cout << "\nAfter:\n"; for (int i = 0; i < 6; i++) { cout << myNumbers[i] << " "; } return 0; }
Before:
10 20 30 40 50 60
After:
30 40 50 60 50 60