You are on page 1of 2

NFC Institute of Engineering&Fertilizer

Research Faisalabad

Department of Electrical Engineering


Fourth Semester
Course Title:
Data Structure & Algorithms (EE-232)
Topic:
Lab Assignments
Submitted To:
Dr. Salman Arain
Submitted By:
Hafeez Ali
Roll.No:
18-ELE-43
Reg.#:
2018-UET-NFC-FD-ELECT-43
Lab.No.8
SINGLY LINK LIST
Task
Write a code to declare a singly list.
Code:
#include <stdio.h>
#include <stdlib.h>

struct LinkedList{
int data;

struct LinkedList *next;


};

node createNode(){
node temp;

temp = (node)malloc(sizeof(struct LinkedList));


temp->next = NULL;

return temp;
}

Conclusion:
In this lab, I concluded the working and implementation of Linked List and
their uses. I also came to know the advantages and disadvantages of using the Linked List in
the programming.

You might also like