Skip to Main Content
Introduction to Computational Modeling Using C and Open-Source Tools
book

Introduction to Computational Modeling Using C and Open-Source Tools

by Jose M. Garrido
November 2013
Intermediate to advanced content levelIntermediate to advanced
461 pages
12h 1m
English
CRC Press
Content preview from Introduction to Computational Modeling Using C and Open-Source Tools
Linked Lists 141
83 };
84 // display data block
85 void display_data(DataT
*
pblock) {
86 printf("Data: %s %d %d \n", pblock->name,
87 pblock->age, pblock->jobcode);
88 }
89 void traverse_display (listT
*
plist) {
90 printf("Traverse and display data: %s \n", plist->lname);
91 int i;
92 DataT
*
lblock;
93 if (plist->numnodes <= 0 )
94 return;
95 lblock = get_front(plist); // get first data block
96 display_data(lblock);
97 for (i=2; i <= plist->numnodes; i++) {
98 lblock = get_next(plist); // get next data block
99 display_data(lblock);
100 }
101 }
In line 12 of the source program, a structure is defined as the data block that
the program uses to store data. The required name of the structure is Datablock
and the form of the structure may vary. Each of these data blocks ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Fundamentals and Programming in C (RMK)

Computer Fundamentals and Programming in C (RMK)

Anita Goel, Ajay Mittal

Publisher Resources

ISBN: 9781482216783