Write a program in C++ to dynamically allocate the memory to an array takes the input to the array and display the same array
#include #include #include class abc { private: int *n,s,i; public: abc(int x) { s=x; } void getdata() { n=new int(s); for(i=0; i >n[i]; } } void show() { for(i=0; i>n; abc sa(n); sa.getdata(); sa.show(); getch(); } OUTPUT How many no: 5 Enter the 1 no :12 Enter the 2 no :34 Enter the 3 no :45 Enter the 4 no :32 Enter the 5 no :11 12 34 45 32 11