Welcome to my C programming learning repository! This repository contains various C programming examples and exercises organized by topics, demonstrating fundamental to intermediate C programming concepts.
Basic C programming concepts and simple programs to get started:
example1.c-example6.c: Various introductory examplesex3.c,ex4.c: Additional exercises
Learn about arrays and their operations:
introduction.c: Basic array input/output operationsArrayTwo.c: Two-dimensional arraysstudent.c: Array applications with student dataTime.c: Time-related array implementations
Conditional statements and decision-making:
if.c: Simple if statementsIf_else.c: If-else conditionsif_else_if.c: Multiple condition checkingNested.if.c: Nested conditional statementsteraryoparater.c: Ternary operator usagetest1.if.c: Practice exercises
Iteration and repetition structures:
while_loop.c: While loop examplesdo_while_loop.c: Do-while loop implementationsforloop.c: For loop demonstrationsnested_loop.c: Nested loop patternslested_loop.c: Additional nested examples
Function declaration, definition, and usage:
introduction.c: Basic function conceptsvalue.c,value1.c: Pass by valuereferent.c,referent1.c: Pass by referenceALL.c: Comprehensive function examples
Pointer concepts and memory management:
Address.c: Working with memory addressesmalloc.c: Dynamic memory allocationcalloc.c: Contiguous memory allocationstrlen.c: String length implementationstricmp.c: String comparison
User-defined data types and structures:
test1.c,test2.c: Basic structure examplesStructArray.c: Arrays of structuresSructPointer.c: Pointers to structuresTeacher_Pointer_Array.c: Complex structure implementations
File handling operations:
text/Introductiob.c: File I/O introductiontext/read1.c: Reading from filestext/write1.c: Writing to filestext/test1_read.c,test1_write.c: Practice examplestext/test1.c: Combined file operations
- GCC compiler or any C compiler
- Text editor or IDE (VS Code, Code::Blocks, Dev-C++, etc.)
To compile a C program:
gcc filename.c -o outputTo run the compiled program:
./outputExample:
gcc introduction/example1.c -o hello
./helloIf you're new to C programming, I recommend following this order:
- Start with Introduction - Get familiar with basic syntax
- Move to Conditions - Learn decision-making
- Practice Loops - Master iteration
- Explore Arrays - Work with data collections
- Learn Functions - Code organization and reusability
- Study Pointers - Memory management (challenging but crucial)
- Understand Structures - Complex data types
- Practice File I/O - Data persistence
- Practice Daily: Consistency is key in programming
- Understand Memory: C gives you direct memory control - learn it well
- Debug Often: Use printf statements and debuggers
- Read Code: Study examples and understand how they work
- Write Code: Theory is important, but practice makes perfect
- C Compiler (GCC)
- Text Editor/IDE
- Terminal/Command Line
This repository represents my personal learning journey in C programming. The code examples range from simple to more complex implementations, covering essential C programming concepts.
This is a personal learning repository, but suggestions and improvements are always welcome!
This repository is for educational purposes.
Happy Coding! 🚀
Last Updated: October 10, 2025