Array manipulation or what Should I say this I donno | Sololearn: Learn to code for FREE!


Array manipulation or what Should I say this I donno How it is 35...Can anyone pleaee explain

c++ c

8/14/2020 10:07:01 AM


13 Answers

New Answer


There is nothing related to array manipulation. The function "fun()" is just displaying the first argument that it receives. In first case it is 3 And in other it is 5


They are just to signify that function defination is complete. Nothing related to programming, it's just that the one who wrote the question want you to only focus on the first parameter and others are irrelevant.


AteFish🇧🇩 you are right but you are not passing an array here, you are just passing a lot of individual arguments to a function.


Arsenic I know arrays are like pointers and as the print only s that means they printed the first element. Am I right?


The first one returns 3 and the second one returns 5. Without the std::endl it looks like 35 but it isn't. They are 2 different numbers.


Arsenic I wanna know why the three dots(...) are here?


Bartas Dausynas Pass the last named argument to va_start (here b) and first argument (numbers) needs to be 3, instead of 5


I think they are indicating that any number of arguments can be passed in the function.


Bartas Dausynas Code works fine, have already fixed it? Ok do you mean variadic list after some number of fixed element?