Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

University C++ Lab Programs

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.

Batch 01

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

Why are there two versions?

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:

  • iostream
  • vector
  • string
  • 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.

Compile

Example with GCC/G++:

g++ -std=c++17 modern/bubble_sort.cpp -o bubble_sort

Then run the resulting executable.

Educational note

These are simple laboratory/practice implementations, not production-quality implementations. They are intentionally useful for learning basic algorithms and data structures.

Historical note

The original source comments contain dates, course/semester references, and the coding style used at the time. They have been retained rather than rewritten.

License

Released under the MIT License. See LICENSE.

About

University C++ lab and practice programs, preserved and modernized for educational use.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages