Write
a C++ program to read array of ' n' integers from user and display it in
reverse order.(Use Dynamic memory allocation)
#include<string.h>
#include<conio.h>
#include<stdio.h>
int
main() {
int
x, n;
cout
<< "Enter the number of items:" << "\n";
cin
>>n;
int
*arr = new int(n);
cout
<< "Enter " << n << " items" <<
endl;
for
(x = 0; x < n; x++) {
cin
>> arr[x];
}
cout
<< "You entered: ";
for
(x = 0; x < n; x++) {
cout
<< arr[x] << " ";
}
{
cout
<< arr[x]<<"";
}
}