37. Insert the following C code fragment in main() of Figure 6.48 just before the return statement:...
Question:
37. Insert the following C code fragment in main() of Figure 6.48 just before the return statement:
sum = 0; p = first;
while (p != 0) {
sum += p->data;
p = p->next;
}
printf("Sum: %d", sum);
and translate the complete program to Pep/9 assembly language. Declare sum to be a local variable along with the other locals as follows:
struct node *first, *p;
int value, sum;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: