Where did he Take the Input From? From the main()?

I am Trying to Compile. But i Have a Doubt. Since the function was premade above the Int. How is he Able to give the Input.

hello @JaveedYar the function is indeed above the main but for your knowledge i would like you to know that the execution always start from the main only.
and the editorial or anythin if you have watched for the code then in that the input must be taken from main only and then there must be the call to the function in which the array must be passed as the parameter int the function call.

hello @JaveedYara as you are not replying that’s why i feel that your query is resolved .
you can mark your doubt as resolved .
on off the chance if you still have doubt you can reopen the doubt and we will help you in resoling your doubt .
Happy Learning !!