Andrew H.

asked • 01/27/21

C programming (output error etc)

output? What happens if we call function?


printf(“\n\n%d\n\n”, funC(pList));

//pList: 20 40 50 10


int funC( NODE *pList )

{

NODE *p1;

NODE *p2;


p2 = NULL;

p1 = pList;

while (p1->link)

{

p2 = p1;

p1 = p1->link;

}

p1->link = pList;

printf(“\n\n%d\n\n”, p1->link->data);

return p2->data;

}

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.