• + 0 comments

    If you have a problem understanding dynamic memory then make use of vector . It allocates memory dynamically wherein the user doesn't have to deal with pointers .

    vector arr(n); declares an array of long int of length n.