Why to use Array? instead take multiple inputs using loop

The doubt is that if i take 10 inputs at run time by loop and same 10 inputs using array .What is the difference …ellaborate.
is there any efficiency?

@Utkarshsingh5298291 Hi buddy, so here you are explicitly saying that 10 nums will be taken so yes, you can create 10 variables but what if you don’t know the exact number say n, now n can be 100000000 say and you want to store the numbers so that you can perform some work on them say sorting, so for storing obviously you have to use an array, right! Listen the video carefully, mam is explaining the array use case.

And about efficiency, you will be studying more about them in coming sections about complexity!.

If your doubt is clear, mark it resolved bro!
Happy coding!

Dude you didn’t get my doubt…and i have listened carefully. …i asked that we can take multiple inputs using loop comparisons with array

@Utkarshsingh5298291 If that is the case then explain your use case clearly with a code snippet! I will be happy to help

And in both the cases you will be using loop right! There is no difference in efficiency as such!

For array also you will be looping till the size and taking inputs and for the inputs also, and in both the cases i am talking about user inputs!

If you have any doubt elaborate it!