A complete collection of C programming code covering beginner to advanced concepts, data structures, and algorithms. This repository contains practical examples, exercises, and projects developed for learning and mastering C programming.
This repository is organized into multiple learning paths and projects, each focusing on different aspects of C programming:
| Directory | Purpose | Topics |
|---|---|---|
| CodeWithHarry(C) | Harry's C Course Exercises | Chapters 1-11, practical exercises, file I/O, memory management |
| Vikash(C) | Personal Learning Journey | Exam codes, intermediate algorithms, OS scripts, system programs |
| DSA | Data Structures & Algorithms | Array ADT, insertion, deletion operations |
| DSA(STCET) | DSA with Menu-Driven Programs | Insertion, deletion, linked lists, matrix operations |
Systematic learning materials from CodeWithHarry C programming course with chapter-wise organization.
-
CH1Prac - Basic Programs
circle.c- Calculate circle area and circumferencerectangle.c- Rectangle area and perimetersi.c- Simple Interest calculationtemp.c- Temperature conversionvolume.c- Volume calculations
-
CH2Prac - Operators & Data Types
div.c- Division operationseval.c- Expression evaluationfloat.c- Floating-point operationsreturn.c- Function return typesWrong.c- Common mistakes
-
CH3Prac - Conditional Statements (if-else, switch)
11.c- Basic conditionalsgreat.c- Find greatest numberinco.c- Income tax calculationlc.c- Lowercase conversionleap.c- Leap year checkerpassf.c- Pass/fail gradingrank.c- Rank determination
-
CH4Prac - Loops (for, while, do-while)
fact.c- Factorial calculationmulrev.c- Multiplication table reversedmulsum.c- Sum of digitsmult.c- Multiplication tableprime.c- Prime number checkerrep8.c- Repeat 8 timessum.c- Sum calculationssumdw.c- Sum of digits whilesumw.c- Sum with while loop
-
CH5Prac - Functions & Recursion
avg.c- Average calculationfibo.c- Fibonacci seriesforce.c- Force calculationpattern.c- Pattern generationquick.c- Quick sort implementationsum.c- Sum functiontemp.c- Temperature conversion function
-
CH6Prac - Pointers
address.c- Address operationsnoppointer.c- Non-pointer operationspass.c- Pass by referencepbref.c- Pointer by referenceptop.c- Pointer to pointers&avg.c- Sum and average with pointerstentime.c- Ten times multiplication
-
CH7Prac - Arrays & 2D Arrays
2d.c- 2D array operationsmul.c- Matrix multiplicationmul2.c- Another multiplication approachmul3.c- Third multiplication variantpos.c- Position findingptr.c- Pointer with arraysrev.c- Array reversalthreed.c- 3D array operations
-
CH8Prac - Strings & Character Arrays
count.c- Count characterscpy.c- String copyencrypt.c- String encryptionfind.c- Find substringslice.c- String slicingstr.c- String operationsstring.c- Advanced string handling
-
CH9Prac - Structures
userinfo.c- User information structure
-
CH10 & CH10Prac - File Handling
read.c- Reading from fileswrite.c- Writing to filesfile.c- Basic file operationsfget.c- File get operations- Sample files:
vikash.txt,table.txt
-
CH11 - Dynamic Memory Allocation
calc.c- Dynamic calculationsdma.c- Dynamic memory allocationfloat.c- Float DMAfree.c- Memory freeingreall.c- Memory reallocation
- Project1 - Random number generator
- Project2 - Main project implementation
Personal practice codes and real-world implementations.
- Welcome.c - Welcome program
Complete solutions for exam programs:
calculator.c- Basic calculatorconcat.c- String concatenationevenOdd.c- Even/odd checkerfact.c- Factorialleap.c- Leap year checkerpointerAddress.c- Pointer address operationspointerValue.c- Pointer value operationsstringCopy.c- String copy operationsvowConst.c- Vowel and consonant countergreatestIn3.c,sum.c,div3&7.c, etc.
Core algorithms and data structure implementations:
- Sorting:
bubble.c,quicksort.c,mergesort.c,insertiton.c,selectionSort.c - Searching:
linearSearch.c - Conversions:
CelToFer.c(Celsius to Fahrenheit) - Structures:
struct.c,tri.c(triangle) - Other:
marks.c,couplesChat.c,co_ordinates.c
notepad.c- Notepad applicationnotePadGUI.c- Notepad with GUI
Shell scripts and C programs for system operations:
- Shell Scripts (.sh files):
HelloWorld.sh- Basic scriptfileChecker.sh- Check file existencedirectoryChecker.sh- Check directory existencefilePermissionChecker.sh- Check file permissionsoddEven.sh- Odd/even checkerpallindrome.sh- Palindrome checkermenuDriven.sh- Menu-driven scriptsystemInfo.sh- System information displayfileCounter.sh- Count filesbackupFile.sh- Backup files
- C Programs:
pallindrome(c).c- Palindrome in Cai.c- AI-related program
Advanced system programming and utilities.
Basic DSA implementations focusing on arrays:
adt.txt- Abstract Data Type documentationarrayAdt.c- Array ADT implementationarrayIns.c- Array insertion operationsarrayDel.c- Array deletion operations
Practical implementations with user menus:
Menudrive(Insertion).c- Menu-driven insertion operationsMenuDriven(Deletion).c- Menu-driven deletion operationsMenuDriven(LinkedList).c- Complete linked list menu systemMenuDrivenMatrix.c- Matrix operations with menu
- Basic input/output
- Data types and operators
- Conditional statements
- Simple problem solving
- Loops and iterations
- Functions and recursion
- Pointers
- Arrays and strings
- String manipulation
- Structures
- File I/O operations
- Dynamic memory allocation
- Complex data structures
- Data structure implementations
- Sorting algorithms
- Searching algorithms
- Linked lists
- Matrix operations
- Exam codes (practical implementations)
- Intermediate algorithms
- OS scripts and system programming
- Advanced applications
| Topic | Files | Difficulty |
|---|---|---|
| Basic I/O | CH1Prac, Welcome.c | Beginner |
| Operators & Expressions | CH2Prac | Beginner |
| Control Flow | CH3Prac | Beginner |
| Loops | CH4Prac | Beginner-Intermediate |
| Functions & Recursion | CH5Prac | Intermediate |
| Pointers | CH6Prac, pointerValue.c | Intermediate |
| Arrays | CH7Prac | Intermediate |
| Strings | CH8Prac, stringCopy.c | Intermediate |
| Structures | CH9Prac, struct.c | Intermediate |
| File Handling | CH10, CH10Prac | Intermediate |
| Memory Management | CH11, dma.c | Advanced |
| Sorting Algorithms | IntermediateCodes/*.c | Advanced |
| Linked Lists | MenuDriven(LinkedList).c | Advanced |
| Matrix Operations | MenuDrivenMatrix.c | Advanced |
# Navigate to desired directory
cd CodeWithHarry(C)/CH1Prac
# Compile
gcc circle.c -o circle
# Run
./circlegcc -Wall -Wextra circle.c -o circle
./circlecd DSA(STCET)
gcc Menudrive(Insertion).c -o insertion
./insertionFormat specifiers are essential for input/output operations in C:
| Specifier | Data Type | Example | Output |
|---|---|---|---|
%d |
int | printf("%d", 42); |
42 |
%u |
unsigned int | printf("%u", 42); |
42 |
%f |
float/double | printf("%.2f", 3.14159); |
3.14 |
%c |
char | printf("%c", 'A'); |
A |
%s |
char* (string) | printf("%s", "Hello"); |
Hello |
%x |
int (hex) | printf("%x", 255); |
ff |
%o |
int (octal) | printf("%o", 64); |
100 |
%lf |
double | printf("%lf", 3.14); |
3.140000 |
%ld |
long | printf("%ld", 1000L); |
1000 |
%lld |
long long | printf("%lld", 9223372036854775807LL); |
9223372036854775807 |
%% |
percent | printf("%%"); |
% |
Vikash Gupta
Learning C programming through building, debugging, and sharing knowledge.
- 🔗 GitHub: @Vortex-16
- 📫 Repository: C Programming Collection
This repository is open for educational purposes. Feel free to use, modify, and learn from these codes.
- Each program has been tested and includes sample inputs/outputs
- Output directories contain compiled binaries and program outputs
- Some programs use file I/O - ensure proper file paths before execution
- For complex programs, read the code comments for better understanding
- CodeWithHarry - Original course reference for CH1-CH11 materials
- STCET - Academic institution reference for DSA materials
- Comments in code provide additional context and explanations
Last Updated: January 2026
Version: 2.0 - Complete Repository Documentation