Advantage of dynamically allocated arrays

When I first learned about dynamically allocated arrays in school, I always thought we used them for passing arrays as parameters to functions. But the more I have been practicing coding, I see now that normal arrays can be passed as parameters to functions. So guys what is the advantage? Why do we even need them?

say you want to allow the user the ability to enter detail about his students. You are not going to know when you compile the program how many students the user will have, thus you would do something like: