You are on page 1of 4

307.

1 Laboratory sheet BUBLE SORTING using Functions

1. BUBBLE SORTING using Functions

OBJECTIVE:

To Develop a C program that implements Bubble Sorting by printing the List after every pass and
printing the List after Bubble sort using Functions.

Minimum Software and Hardware Requirement:

1. Turbo C/C++ compiler

2. Personal Computer with 2GB RAM, 320GB HDD and Pentium2 processor or above

TASK ANALYSIS:

A. KNOWLEDGE

i. Basic idea of Turbo C/C++ IDE.

ii. Basic structure of a sample C program.

iii. Understanding how sorting to be done.

iv. Familiarity with bubble sort Algorithm and Logic.

v. Basic idea about bubble sorting technique.


307.1 Laboratory sheet BUBLE SORTING using Functions

B. SKILL

 Opening Turbo C/C++ Software

 Creating new file with .c extension.


Handling of Turbo
 Compiling a C program for zero errors.
C/C++ Software
 Executing a C program for valid output.

 Giving proper inputs at runtime


 Implementing bubble sorting concept
Manipulation
Activities  Observing the sorted list.

 Writing the logic of Bubble Sort program.

 Identifying and Correcting syntactical errors.


Precise
 Debugging logical errors.
operations/Activities
 Checking whether Bubble Sort algorithm is properly implemented.

 Checking whether the Sorted List is generated after the Bubble


Sort is performed for the given unordered list.
307.1 Laboratory sheet BUBLE SORTING using Functions

2.5.TEACHING
SCHEME OFPOINTS
EVALUATION

Sl.No Teaching Point Suggested Time-15 min


1. Usage
CATEGORY OF of Turbo C/C++ IDE. 1 WITH
WEIGHTAGE TOTAL
SUB TASK
SKILL
2. Reading input elements into an Array COMPETENCY
1 LEVEL
INDIVIDUALLY (50)
3.Applying bubble sort algorithm properly 5
A. Opening Turbo C/C++ Software
4. modifying the elements in an array A B C 5D T
B. Creating new file with .c 5
extension.
5. Displaying the sorted ordered list 1 1 2 21 5
1. Handling of Turbo
C. Compiling a C program for zero
6. Save the program 1
C/C++ Software
errors.

A. Procedural precautions: D. Executing a C program for valid


output.
 Open Turbo C/C++ A.Software
Giving proper inputs at runtime
A B C T
 Click on the File B. implementing
Menu and select Newbubble
optionsorting
2. Manipulation 3 5 2 10
concept
 Type a program.
Activities 10
 C. .c
Save the program with Observing the sorted list.
extension.

B. Safety precautions:
A. Writing the logic of bubble Sort A B C D E T
 program.
Don’t eat or drink at the workplace.
25
3.Precise
 B. Identifying
Don’t carry inflammables and
at the Correcting
work place.
operations/Activities syntactical errors 8 5 5 4 3 25
3. NEED AND SCOPE OF EXPERIMENT
C. Debugging logical errors
 This experiment is D.
to create a C program.
Checking whether Bubble Sort
algorithm is properly implemented
It is used to effectively sort the given unordered list of elements to display ordered sorted
list. E. Observing the result whether the
list is sorted
4. PLANNING AND ORGANISATION

ACTION A. Co Operation ACTIVITY 5


A B C D E T
 Proper power supply.
Check for B. Co-Ordination
 Input and Output devices connections.
1 1 1 1 1 5
C. Communication
Presence of Turbo C/C++ Software in PC.
For Design of  Read teaching points carefully.
Instruction
307.1 Laboratory sheet BUBLE SORTING using Functions

4.Values D. Ethics
E. Leadership

50
Total

6. ASSESSMENT / VIVA QUESTIONS (Indicative purpose)

1. How many comparisons does it take to perform a bubble sort on a list of n elements?

2. Why do you think Bubble Sort is called “Bubble” Sort?

3. What is the best case scenario when using a bubble sort algorithm?

4. What is the worst-case time complexity of a bubble sort algorithm?

5. In what order should the input data be given to a bubble sort algorithm for it to work correctly?

You might also like