-
-
Save anonymous/250834d37396429e07256cd4d2994097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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