A collection of C/C++ programs written during university laboratory classes, examinations, and practice sessions.
These programs are preserved as educational material. The original/ directory contains the historical source files as they were supplied, while modern/ contains cleaned-up C++ versions intended to compile with a modern C++ compiler.
| Original | Topic | Modern version |
|---|---|---|
BUB-SORT.CPP |
Bubble sort | modern/bubble_sort.cpp |
BINARY.CPP |
Binary search | modern/binary_search.cpp |
F-BINARY.CPP |
Binary search using functions | modern/function_binary_search.cpp |
INSERT.CPP |
Single insertion | modern/insertion.cpp |
F-INSERT.CPP |
Single insertion using functions | modern/function_insertion.cpp |
LSEARCH.CPP |
Linear search | modern/linear_search.cpp |
F-LSEARC.CPP |
Linear search using functions | modern/function_linear_search.cpp |
MUL-INSE.CPP |
Multiple insertion | modern/multi_insert.cpp |
F-MUL-IN.CPP |
Multiple insertion using functions | modern/function_multi_insert.cpp |
Q-SORT.CPP |
Quick sort | modern/quick_sort.cpp |
REPLACE.CPP |
String replacement | modern/string_replace.cpp |
The original programs are part of the historical record of the university lab work. They use older Turbo C/C++ conventions such as conio.h, clrscr(), getch(), delay(), goto, one-based array indexing, and void main().
The modern versions keep the educational purpose of the programs while using standard C++ facilities such as:
iostreamvectorstring- standard algorithms
int main()- zero-based internal indexing
User-visible positions are still displayed starting from 1 to make them easier to compare with the original programs.
Example with GCC/G++:
g++ -std=c++17 modern/bubble_sort.cpp -o bubble_sortThen run the resulting executable.
These are simple laboratory/practice implementations, not production-quality implementations. They are intentionally useful for learning basic algorithms and data structures.
The original source comments contain dates, course/semester references, and the coding style used at the time. They have been retained rather than rewritten.
Released under the MIT License. See LICENSE.