What is the difference when array is declared as array[n] or as pointer array* according to example below? I guess that for example both 'a' and 'c' point at the first element of array, but they behave different.
#include <iostream>
int main() { 
    int a[3] = {1};
    int b[5];
    std::cout << *a << std::endl; //prints 1 - ok
    //a = b; //error during compilation
    int* c = new int[3];
    c[0] = 2;
    int* d = new int[5];
    std::cout << *c << std::endl; //prints 2 - ok
    c = d; //works ok!
    return 0;
}
 
     
    