Skip to content

Instantly share code, notes, and snippets.

/hw9

Created October 15, 2016 06:30
Show Gist options
  • Save anonymous/250834d37396429e07256cd4d2994097 to your computer and use it in GitHub Desktop.
Save anonymous/250834d37396429e07256cd4d2994097 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <iomanip>
using namespace std;
int SIZE;
int arrayEx (int* , int SIZE);
int main() {
int array[SIZE];
int s;
cout << "enter the size" << endl;
cin >> SIZE;
cout << "enter the numbers in the array" << endl;
for ( int i = 0; i < SIZE; i++)
cin >> array[i];
arrayEx(array, SIZE);
cout << *n <<endl;
}
int arrayEx (int array[], int SIZE) {
int s;
s = SIZE*2;
int* n = new int[s];
for (int i = 0; i < SIZE; i++)
*(n+i)= array[i];
return new int[s];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment