MCQ pointers Q-3

hello sir,
Q how to create dynamic array of size 100 in c++
ans int *arr=new int[100];

sir,why not this (int *arr=new int[100]:wink:

hey @pps.vikhyat.17, *int arr=new int[100]; is to creating 2-D array and *int arr=new int[100] is to create 1-D array. This is the proper logic. Might be there is anything wrong in Question.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.