36 void changinglisti(node head) ( 37 node *p, *k, *z; 38 k=head; D- int ort, s-0 while (k!-NULL}€ p=head;> int temp =0; while (p->nextNULL){ 39 40 41 42 43 RE if{-p->data > p->next->data) ( temp-p->data; od p->data-p->next->data: p->next->data=temp: 44 45 46 47 48 (0- 3 49 P*p->next: 50 51 k=k->next: 52 53 54 55 Evoid changinglist2 (node *head) { 56 ou teo node p, k, *z; ) 57 k=head; p-head: while (p->next!=NULL){ 58 59 60 k-p: 61 62 E while(z-Sdataz->next->data) ( 63 k=z->next: 64 z->next-z->next->next: 65 free (k) : 66 67 P-p->next: 68 69 71 Bint main (int arge, char *argv[){ 72 char "no; 73 no= (char ") malloc (sizeof (char)) : 74| printf ("Enter Your student number: ") : 75 scant ("s", no) : 76 node root: root-createlist (no); changinglist1 (root); 77 78 79 changinglist2 (root): 80 showlist (root) :
36 void changinglisti(node head) ( 37 node *p, *k, *z; 38 k=head; D- int ort, s-0 while (k!-NULL}€ p=head;> int temp =0; while (p->nextNULL){ 39 40 41 42 43 RE if{-p->data > p->next->data) ( temp-p->data; od p->data-p->next->data: p->next->data=temp: 44 45 46 47 48 (0- 3 49 P*p->next: 50 51 k=k->next: 52 53 54 55 Evoid changinglist2 (node *head) { 56 ou teo node p, k, *z; ) 57 k=head; p-head: while (p->next!=NULL){ 58 59 60 k-p: 61 62 E while(z-Sdataz->next->data) ( 63 k=z->next: 64 z->next-z->next->next: 65 free (k) : 66 67 P-p->next: 68 69 71 Bint main (int arge, char *argv[){ 72 char "no; 73 no= (char ") malloc (sizeof (char)) : 74| printf ("Enter Your student number: ") : 75 scant ("s", no) : 76 node root: root-createlist (no); changinglist1 (root); 77 78 79 changinglist2 (root): 80 showlist (root) :
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Solve it
solve the answer according to the values I gave. student no:2012010206083
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY