I have some doubts In the following lines of code:
int *p=new int(30);
cout<<*p;
int *arr=new int[30];
cout<<arr[0]<<endl;
Why didn’t we put * before arr[0] just like we did for the variable p?
I have some doubts In the following lines of code:
int *p=new int(30);
cout<<*p;
int *arr=new int[30];
cout<<arr[0]<<endl;
Why didn’t we put * before arr[0] just like we did for the variable p?