Contoh program sederhana Linked List
![](http://img2.blogblog.com/img/icon18_edit_allbkg.gif)
https://im-informatika.blogspot.com/2015/05/contoh-program-sederhana-linked-list.html
Sebelum memahami contoh program sederhana Linked List, Anda harus paham terlebih dahulu tentang Linked List. Jika sudah paham silahkan di simak source code contoh program sederhana Linked List dari saya ;) .
Screenshoot output program
![Contoh program sederhana Linked List Contoh program sederhana Linked List](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBQdCuiK7rNDBfsibsivn1gf8xy2q70VTkTp6yZDP7lHJ2bF84QiqjouGUal61zzaF8_xjA7AuXwrTxpCfrIoz2v4Xz-PjmxAi6ImUNkaAqJGPhC8s8E3pRFHGmwou0U4rgT-e6dPAhPw/?imgmax=800)
#include <conio.h> #include <stdio.h> #include <iostream.h> #include <stdlib.h> struct simpul { char nim[11]; char nama[35]; int smt; struct simpul *next; }; struct simpul *head = NULL; main() { struct simpul *p; struct simpul *curr; clrscr(); p = (struct simpul *)malloc(sizeof(struct simpul)); strcpy(p->nim,"14.11.0095"); strcpy(p->nama,"FEGI T"); p->smt=2; p->next=head; head = p; p = (struct simpul *)malloc(sizeof(struct simpul)); strcpy(p->nim, "14.11.0115"); strcpy(p->nama, "WIDIASTUTI"); p->smt=2; p->next=head; head = p; curr=head; while(curr) { cout<<"NIM : "<<curr->nim<<endl; cout<<"Nama : "<<curr->nama<<endl; cout<<"Semester : "<<curr->smt<<endl<<endl; curr=curr->next; } getch(); }
Screenshoot output program