Question: 38. Insert the following C code fragment between the declaration of node and main() in Figure 6.48: void reverse(struct node *list) { if (list !=

38. Insert the following C code fragment between the declaration of node and main() in Figure 6.48:

void reverse(struct node *list) {

if (list != 0) {

reverse(list->next);

printf("%d ", list->data);

}

}

and the following code fragment in main() just before the return statement:

printf("");

reverse(first);

printf("");

Translate the complete C program to Pep/9 assembly language. The added code outputs the linked list in reverse order.

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 Principles Algorithms And Systems Questions!