From cfcb20bc84fc66af6d2051adf28a459572ef7c9c Mon Sep 17 00:00:00 2001 From: Gargi Dhawan <97967292+Gargidhawan@users.noreply.github.com> Date: Thu, 20 Oct 2022 02:35:44 +0530 Subject: [PATCH] Reverse the array code of how to reverse the array in c++ --- C++ Codes/reverseaarray.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 C++ Codes/reverseaarray.cpp diff --git a/C++ Codes/reverseaarray.cpp b/C++ Codes/reverseaarray.cpp new file mode 100644 index 0000000..c2d3c1d --- /dev/null +++ b/C++ Codes/reverseaarray.cpp @@ -0,0 +1,24 @@ +#include +using namespace std; +int main() +{ + int n; + cin>>n; + int*ptr = new int (n); + int arr[n]; + + cout<<"Enter the array"<>arr[i]; + cout<0;i--) + { + cout<