Computer Science, asked by saivamshigoud1, 7 months ago

. Lets assume address of head of a linked list containing

finite elements is sent to the following function. Explain

the output of the following function with an example. (6

Marks)

void action(struct Node** head, int k)

{

if (k == 0)

return;

struct Node* temp = *head;

int count = 1;

while (count < k && temp != NULL) {

temp = temp->next;

count++;

}

if (temp == NULL)

return;

struct Node* target = temp;

while (temp->next != NULL)

temp = temp->next;

temp->next = *head;

*head = target->next;

target->next = NULL;

}​

Answers

Answered by Tukaramgophane1985
1

Answer:

#2353₹'&#-19 *__2344&# # # ##

Similar questions