LAB MANUAL Data Structures and Algorithms
LAB NO. 12 03/12/ 2024
Implementation of Pointers.
Lab outcomes:
After completing this lab, students will be able to.
Understand the basic of Pointers
Corresponding CLO and PLO:
CLO-2, PLO-3
Tools:
Eclipse IDE
JDK
Dev C++
Theory:
A pointer is a variable that stores the memory address of another variable as its value.
A pointer variable points to a data type (like int) of the same type, and is created with the * operator.
The address of the variable you are working with is assigned to the pointer:
CODE
LAB MANUAL Data Structures and Algorithms
Output:
Observations:
In this lab, we used pointers to store memory addresses, accessed values using the * operator, and
explored double pointers for multi-level referencing. This helped us understand how pointers manage
memory efficiently.
LAB MANUAL Data Structures and Algorithms
Rubrics:
Absent Student is Student can Student has Student has Student
unable to understand followed constructed perfectly
follow the the provided instructions the implemented a
provided laboratory to construct functional/ working
instructions instructions the working model/ logic/
properly. and familiar fundamental schematic/ circuit/ block
The student with the lab schematic/ model/ block diagram/ code
can name the environment block diagram/ and
Demonstration hardware or (Trainer/ diagram/ code, and successfully
simulation software/ code/ model have executed the
platform, but IDE), but on the successfully lab objective in
unable to cannot protoboard/ executed the Realtime or in
implement implement on trainer/ program/ run a simulation
anything the platform simulation circuit on environment
practically or practically or software. software and produced
on the software on the platform the desired
software results
Category Ungraded Very Poor Poor Fair Good Excellent
Percentage [0] [1-20] [21-40] [41-60] [61-80] [81-100]
Marks 0.0 0.1 0.2 0.3 0.4 0.5
Date Total Marks Instructor’s Signature
Report not Plagiarized Requirements Observations Appropriate Correctly
submitted content are listed and are recorded computations drawn
presented or experimental along with or numerical conclusion
Laboratory incomplete procedure is detailed analysis is with
Reports submission presented procedure performed exact results
and complete
report in all
respects
Category Ungraded Very Poor Poor Fair Good Excellent
Percentage [0] [1-20] [21-40] [41-60] [61-80] [81-100]
Marks 0.0 0.1 0.2 0.3 0.4 0.5
Date Total Marks Instructor’s Signature
LAB MANUAL Data Structures and Algorithms
LAB NO. 7 15/ 10 / 2024
Implementation of Sorting Algorithms.
Lab outcomes:
After completing this lab, students will be able to.
Implement Selection Sort.
Corresponding CLO and PLO:
CLO-1, PLO-5 (Modern Tool Usage)
Tools:
VS Code
Dev C++
Selection Sort Algorithm:
The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering
ascending order) from the unsorted part and putting it at the beginning.
The algorithm maintains two subarrays in each array.
The subarray which already sorted.
The remaining subarray was unsorted.
In every iteration of the selection sort, the minimum element (considering ascending order) from the
unsorted subarray is picked and moved to the sorted subarray.
Working of Selection Sort:
1. Set the first element as minimum
2. Compare minimum with the second element. If the second element is smaller than minimum,
assign the second element as minimum.