Copying one array to another array

PHOTO EMBED

Sun Feb 11 2024 16:15:05 GMT+0000 (Coordinated Universal Time)

Saved by @sinasina1368 #c++

#include <iostream>


using namespace std;

int main() {

   int firstArray[] = {10,20,30,40};
   int secondArray[size(firstArray)];

   for (int i = 0; i < size(firstArray); i++)
       secondArray[i] = firstArray[i];

   for (int number: secondArray)
       cout << number << endl;


    return 0;

}
content_copyCOPY