+ 5
Hey, I have a doubt. What is three dots (...) in the function's parameter? Someone please tell me! I will be so grateful. 🙌🏻🥺
for example: int average(int num1, ...) { //Code } int main() { average(1, 2, 3, 4, 5); return 0; }
5 Réponses
+ 4
I hope this code explains this.
https://code.sololearn.com/cYUYNaxBw6Yr/?ref=app
+ 6
Aaron Eberhardt Thanks for explaining so well. 🙌🏻🌟
+ 5
I got it. Thanks Martin Taylor 👍
+ 4
You can also write your own functions with a variable number of arguments as Aaron Eberhardt demonstrated.