Curriculum lab programs, Object-Oriented Programming (OOP) architectures, stream file handling, and core C/C++ syntax exercises.
This repository focuses on C and C++ programming fundamentals, language syntax, Object-Oriented Programming (OOP), and university coursework/lab assignments.
π‘ Repository Distinction:
cpp-programming-practice(This Repo): Language features, OOP principles (inheritance, polymorphism, virtual base classes), file I/O, switch-cases, and curriculum lab implementations.DSA-in-Cpp: Dedicated algorithm analysis, time/space complexity, and progressive Data Structures & Algorithms learning.
cpp-programming-practice/
βββ 1. Basic/ # Fundamental I/O, arithmetic calculations, basic formulas
βββ 2. conditional statement/ # If-else decision logic, validation checks, quadratic roots
βββ 3. loop/ # Iterative control flow, primes, Armstrong, GCD/LCM
βββ 4. switch case/ # Menu-driven branching and multi-way logic
βββ 5. array/ # Array manipulation and algorithmic exercises
βββ 6. String/ # Character arrays, null-terminators, getline, and std::string
βββ ERP/ # Academic coursework & lab assignments (Stack, Queue, Tree, Linked List)
βββ OOPS/ # Object-Oriented Programming (Classes, Polymorphism, Virtual classes, File I/O)
1. 1. Basic
| Program | Description |
|---|---|
001_ascii_value.cpp |
ASCII value of a character |
002_abbreviated.cpp |
Abbreviated name formatting |
003_temperature.cpp |
Celsius to Fahrenheit conversion |
004_areaOfCircle.cpp |
Area of circle |
005_area_circumf_circle.cpp |
Area and circumference of circle |
006_simple_Interest.cpp |
Simple interest calculation |
007_marksOf_5.cpp |
Sum and average marks of 5 subjects |
008_gross_Salary.cpp |
Gross salary calculation based on allowances |
| Program | Description |
|---|---|
001_odd_even.cpp |
Even or odd number check |
002_positive_negative.cpp |
Positive, negative, or zero check |
003_voting.cpp |
Voting eligibility check |
004_divisibleBy5_11.cpp |
Divisibility check by 5 and 11 |
005_greatest_number.cpp |
Greatest of three numbers |
006_leap_Year.cpp |
Leap year validation |
007_alphabetOrNot.cpp |
Alphabet character validation |
008_vowelOrConsonant.cpp |
Vowel or consonant check |
009_charcheck.cpp |
Character type classifier |
010_weekday.cpp |
Day of week from number |
011_profite_loss.cpp |
Profit or loss calculation |
012_valid_Triangle.cpp |
Triangle validity check by angles |
013_valid_Triangle_side.cpp |
Triangle validity check by side lengths |
014_check_Triangle.cpp |
Classify triangle as equilateral, isosceles, or scalene |
015_quadratic_Equation.cpp |
Roots of a quadratic equation |
016_correct_date.cpp |
Date validation and leap year check |
017_numberOfNotes.cpp |
Currency notes breakdown |
3. 3. Loop
| Program | Description |
|---|---|
001_table.cpp |
Multiplication table |
002_even_numberCount.cpp |
Print and count even numbers |
003_odd_numberCount.cpp |
Print and count odd numbers |
004_factorial.cpp |
Factorial of a number |
005_factors.cpp |
Factors of a number |
006_count_digit.cpp |
Count digits of an integer |
007_reverse_number.cpp |
Reverse a number |
008_palindrome.cpp |
Palindrome number check |
009_largest_digit.cpp |
Largest digit in a number |
010_armstrong.cpp |
Armstrong number check |
011_fibonacci_series.cpp |
Fibonacci series generation |
012_prime_number.cpp |
Prime number check |
013_count_primeNumber.cpp |
Count and print prime numbers in a range |
014_gcd.cpp |
Greatest Common Divisor (GCD) |
015_lcm.cpp |
Least Common Multiple (LCM) |
016_sumOfN.cpp |
Sum of first N natural numbers |
| Program | Description |
|---|---|
001_calculator.cpp |
Arithmetic calculator using switch |
002_days.cpp |
Day of week display |
003_grade_system.cpp |
Student grade evaluation |
004_removeVowel.cpp |
Vowel filter using switch |
005_cylinder.cpp |
Cylinder volume and surface area calculations |
5. 5. Array
| Program | Description |
|---|---|
001_insertion.cpp |
Array element insertion |
002_trappingRainwater.cpp |
Trapping Rain Water problem |
6. 6. String
| Program | Description |
|---|---|
001_char_array.cpp |
Character array fundamentals |
002_NullChar.cpp |
Null-terminator (\0) handling |
003_getline.cpp |
Full line reading with getline |
004_string.cpp |
Standard std::string operations |
005_reverseString.cpp |
In-place string reversal |
π οΈ Academic Coursework & Labs (ERP)
| Program | Description |
|---|---|
001_greaterNumber.c |
Elements greater than a given threshold |
002_frequencyElement.c |
Element frequency counter |
003_sum_of_2.c |
Two sum implementation in C |
| Program | Description |
|---|---|
001_sll_basic.c |
Singly linked list node structure definition |
002_sll_create_display.cpp |
Create and display singly linked list |
003_sll_delete_first.cpp |
Delete head node in singly linked list |
004_sll_delete_last.cpp |
Delete tail node in singly linked list |
005_dll_create_display.cpp |
Doubly linked list creation and traversal |
006_cll_create_display.cpp |
Circular linked list creation and display |
| Program | Description |
|---|---|
001_stack.cpp |
Array-based stack (push, pop, top) |
002_factorsUsingstack.c |
Factor calculation utilizing stack |
003_palindrome_checker.cpp |
Palindrome validation using stack |
004_valid_expression.cpp |
Balanced parentheses checker |
| Program | Description |
|---|---|
001_simple_queue.cpp |
Linear array-based queue |
002_double_queue.cpp |
Double-ended queue (deque) operations |
003_priority_queue.cpp |
Priority queue implementation |
004_circular_queue.cpp |
Circular queue implementation |
| Program | Description |
|---|---|
ll.cpp |
Binary tree node structure & manual node linkage |
ποΈ Object-Oriented Programming (OOPS)
| Program | Description |
|---|---|
001_userDefineDataType.cpp |
User-defined data types using classes |
002_carClass.cpp |
Class encapsulation, methods, and attributes |
003_passing_by_values.cpp |
Passing class objects by value |
004_constructors.cpp |
Default and parameterized constructors |
005_inheritance.cpp |
Single and hierarchical inheritance |
| Program | Description |
|---|---|
001_first.cpp |
File writing using ofstream |
002_ifstream.cpp |
File reading using ifstream |
003_ofstream.cpp |
Output stream operations |
004_endOfFlie.cpp |
End of file detection (eof()) |
005_formatedoutput.cpp |
Formatted stream output |
006_formatedInput.cpp |
Formatted stream input |
001_read_file.cpp |
Sequential record reading |
002_write_file.cpp |
Sequential record writing |
| Program | Description |
|---|---|
001_q_1.cpp |
Pointer to object instances |
002_employee.cpp |
Pointer manipulation on class records |
003_animal.cpp |
Pointers in base and derived classes |
004_employee_2.cpp |
Dynamic memory allocation for objects |
005_function_overloading_class.cpp |
Function overloading within classes |
006_function_overloading_class_2.cpp |
Varied signatures in method overloading |
007_all_overlapping.cpp |
Overloading vs overriding interactions |
008_area_all.cpp |
Overloaded geometric area calculations |
009_channel.cpp |
Pointer usage in channel structures |
| Program | Description |
|---|---|
001_datatype_change.cpp |
Compile-time polymorphism |
002_q_3.cpp |
Polymorphism problem solving |
003_function_overwrite.cpp |
Function overriding |
004_virtual_employee.cpp |
Virtual member functions |
005_polymorphismUsingvirtual.cpp |
Runtime dynamic dispatch using virtual |
001_pg_1.cpp |
Resolving diamond inheritance using virtual base classes |
Compile any source file using g++ (or gcc for .c files):
# Compile C++ program
g++ "OOPS/004_constructors.cpp" -o constructors
./constructors
# Compile C lab program
gcc "ERP/Stack/002_factorsUsingstack.c" -o factors
./factorsLakshya Kurvey
B.Tech Information Technology Student
Shri Shankaracharya Institute of Professional Management & Technology (SSIPMT), Raipur
GitHub: @lakshyakurvey19-code