//Q2) Create an array of integers using dynamic memory allocation. Display the sum, all the integers and there respective addresses.
#include
#include
using namespace std;
int main(){
int n;
cout<<"Enter the size of the array: ";
cin>>n;
int *arr=(int*)malloc(n*sizeof(int));
cout<>*(arr+i);
}
int sum=0;
for(int i=0;i