Question: Which of the following code snippets will sort a vectorv of integers in descending order by using the sort function from the C + +

Which of the following code snippets will sort a vectorv of integers in descending order by using the sort function from the C++ library?
sort(v.begin(), v.end());
for (int i=0; swap(v[i],v[v*size()-1-i])i=0i++swap(v[i],v[v*size()-1-i])swap(v[i],v[v*size()-1-i])i=0i++v[i]=-v[i]i; i++i=0;ii; i++i
 Which of the following code snippets will sort a vectorv of

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!