CPS 125 Lecture Notes - Lecture 1: Linked List

74 views1 pages

Document Summary

#include typedef struct road_trip accessible in all functions. char place; struct road_trip *next; }trip; int main(void) trip s1,s2,s3,s4,s5,s6; trip *ptr; s1. place = a"; s2. place = b"; s3. place = c"; s4. place = d;; s5. place = e". This variable is a pointer to the structure s5. next = &s1; correspondence with the linked list. ptr = &s2; s1. next = &s4; s3. next = null; s4. next = &s3; s2. next = &s5; Follow the map bellow in ptr stores address of rst node in linked list while(ptr=null); printf( %c ,ptr >place); ptr = ptr >next; return(0); ptr >next; ==> (*ptr). next. 2081 > b || 9102 > e || 4111 > a ||2020 > d ||9090 > c ||\0.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents