Question: Given that vectors are not automatically passed by reference to a function, which is the correct way to define a function getData that is supposed

Given that vectors are not automatically passed by reference to a function, which is the correct way to define a function getData that is supposed to populate a vector passed as a parameter, so the values remain in the vector after the function returns.

A)void readData (vector&list);

b) void readData(vectorlist);
c) void readData(&vectorlist);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!