Multiple choice in data structures void doo(list &L){ int item,a,p=L.size()-1; L.retrieve(p,a); for(int i=0;i

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question

Multiple choice in data structures

void doo(list<int> &L){

int item,a,p=L.size()-1; L.retrieve(p,a);

for(int i=0;i<L.size()-1;i++){ L.retrieve(i,item); 

if(item<a){a=item; p=i;}}

L.remove(p);}

What is this function do?

a.

remove the last item from the list

b.

doesn't do anything

c.

if the list is empty an error is happened

d.

remove the minimum item from the list

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT