whats the static and dynamic array means ,whats the diff ?
or wht is static and dyanamic
Explaination required
Hello @thakur0_0,
-
This has been already answered in your course.
When you were studying dynamic memory allocation.
As we want to return the array to the main function thus we are using dynamic memory allocation here.
Suggestion:
Read this part of your course again. -
We have made the input array static with the help of a static keyword.
This will make a single copy of the input array for the function calls.
Study about it here: https://www.studytonight.com/cpp/static-keyword.php
Hope, this would help.
Give a like if you are satisfied.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.