A curated repository of C programs demonstrating core programming concepts, data structures, algorithms, and problem-solving techniques in C.
This repository contains all C programs and lab assignments from Semester 1 and Semester 2 of my computer science course.
It provides a structured learning path from basic C programming concepts to advanced data structures and algorithms.
All programs are well-commented, organized by week and topic, and intended as a reference for students and coding enthusiasts.
-
Tool Description 💻 Compiler GCC (GNU Compiler Collection) 🖊 Editor VS Code, Code::Blocks, Dev C++ 🌐 Language C 🖥 Platforms Windows, macOS, Linux 🔗 Version Control Git & GitHub
Semester 1 focuses on core C concepts, including:
- Variables, constants, and data types
- Operators and expressions
- Control flow: loops and conditional statements
- Functions and recursion
- Arrays and strings
- Pointers and dynamic memory
- Structures, unions, and file handling
Topics Covered:
- Program structure
- Input/output using printf and scanf
- Basic arithmetic operations
Example Files:
- ASCIIValueOfCharacter.cpp
- Add2DistancesEnteredByUser.cpp
- Add2MatricesofOrderN.cpp
- AreaAndPerimeterOfDiff.Shapes.cpp
Topics Covered:
- Conditional statements (if, else, switch)
- Looping constructs (for, while, do-while)
- Nested loops and pattern printing
Example Files:
- CheckNo.PrimeOrNot.cpp
- FabonaccciSeries.cpp
- FactorialOfAGivenInteger.cpp
- FactorialOfNumber.cpp
- FibonacciSeriesUptoNUsingRecursion.cpp
- FindArmstrongNo.InRange0to999.cpp
Topics Covered:
- Single and multi-dimensional arrays
- String manipulation
- Searching and matrix operations
Example Files:
- CountEven(int,int)RecievesIntegerArray.cpp
- ToFindLargestElementOfGivenArray.cpp
- SumOfArrayElements.cpp
- SortArrayInAscendingOrder.cpp
- ToPerformOperationOnStringsUsingStringFunc..c
- ToRemoveAllVowelsFromString.c
Topics Covered:
- Creating and using functions
- Parameter passing by value and reference
- Modular programming
Example Files:
- UserDefinedFunc.ToExchangeValuesOf2Variables(USING 3rd VARIABLE).cpp
- UserDefinedFunc.ToExchangeValuesOf2Variables(WITHOUT USING 3rd VARIABLE).cpp
- UsesFunctionsToPerformOperations.c
Topics Covered:
- Creating, reading, writing, and appending files
- Error handling in file operations
Example Files:
- CreateAFile&StoreSomeInfo.cpp
- ReadDataFromFile.cpp
- ConcertAllContentOfTextFileToUppercase.cpp
- CountNo.OfLines,Char,BlankSpaces.cpp
Topics Covered:
- Pointer arithmetic
- Dynamic memory allocation (malloc, calloc, realloc, free)
- Using pointers with arrays and structures
Example Files:
- StoreElementsInArrayPrintElementUsingPointer.cpp
- ToStoreInfoUsingStructures,PointerWithDynamicallyMemoryAllocation.c
Topics Covered:
- Structures for data storage
- Arrays of structures
- Employee/student record management
Example Files:
- ToStoreStudent'sInformation(UsingStructure).c
- ProgramToAccept5RecordsOfEmployees.cpp
- StoreRecordOfStidentsTheirDetails.cpp
- StoreRecordsOfNStudentsOfClassArrangeRankwise.cpp
Semester 2 emphasizes data structures and algorithm implementation, including:
- Stacks, queues, and circular queues
- Linked lists (singly, doubly, circular)
- Trees and traversal algorithms
- Expression evaluation
- Sorting and searching algorithms
Example Files:
- ThatImplementsStackAndItsOperationsUsingArray,LinkedLists(Pointers).c
- ThatImplementsQueueAndItsOperationss.c
- ThatImplementsCircularQueueUsingArrays.c
Example Files:
- ToPerformOperationsOnASinglyLinkedList.c
- ToPerformOperationsOnADoublyLinkedList.c
- ToPerformOperationsOnACircularLinkedList.c
Example Files:
- ToAdd2Distances(UsingStructure).c
- ToAdd2ComplexNo.ByPassingStructureWithFunc..c
- ToCalculateTheDifferenceBtw2TimePeriods.c
Example Files:
- ToConvertTheInfixExpressionIntoPostfixExpression.c
- ToEvaluatePostfixExpression.c
Example Files:
- ToMerge2SortedArraysInto1Array.c
- ToPerformTheDiffSortingMethods.c
- BinarySearch.cpp
Example Files:
- ToFindNo.OfVowels,Consonants,DigitsAndWhiteSpace.c
- ToRemoveGivenWordFromString.c
- UsesBothRecursiveAndNon-RecursiveFunctions.c
Clone the repository:
git clone https://github.com/<your-username>/<repo-name>.git
Navigate to the repository folder:
bash
Copy code
cd <repo-name>
Compile a program:
bash
Copy code
gcc Semester_1/Week_1/ASCIIValueOfCharacter.cpp -o ascii
Run the compiled program:
Linux/macOS: ./ascii
Windows: ascii.exe
Example Output:
less
Copy code
Enter a character: A
ASCII value: 65
pgsql
Copy code