I have just been starting with C++ and I have come across multiple types of array declaration in C++
int data[3];
and other type is,
int *data= new data[3];
What is the difference between the two? Since, I have not allocated memory in the first case will I overwrite memory which may already be in use and potentially cause segmentation error?