This repository contains various C programming modules and examples to help learn and practice C programming concepts.
This repository serves as a collection of C programming modules covering different topics and concepts. Each module contains example code and explanations to help understand C programming fundamentals.
// ... existing content until Modules section ...
The repository includes the following modules:
-
Basic Syntax π
- Variables and Data Types
- Integer types (int, short, long)
- Floating-point types (float, double)
- Characters and strings
- Boolean values
- Operators
- Arithmetic operators (+, -, *, /, %)
- Relational operators (==, !=, >, <, >=, <=)
- Logical operators (&&, ||, !)
- Bitwise operators (&, |, ^, <<, >>)
- Control Flow
- if-else statements
- switch-case
- Loops (for, while, do-while)
- Break and continue
- Functions
- Function declaration and definition
- Parameter passing
- Return types
- Recursive functions
- Variables and Data Types
-
Arrays and Strings π
- Array Operations
- Declaration and initialization
- Traversing arrays
- Sorting algorithms
- Searching algorithms
- String Manipulation
- String functions (strlen, strcpy, strcat)
- String parsing
- Character arrays
- Multi-dimensional Arrays
- 2D arrays
- Matrix operations
- Array of pointers
- Array Operations
-
Pointers π―
- Pointer Basics
- Address and indirection operators
- Null pointers
- Void pointers
- Pointer Arithmetic
- Array access using pointers
- Pointer increments and decrements
- Dynamic Memory Allocation
- malloc(), calloc(), realloc()
- Memory management
- Memory leaks prevention
- Pointer Basics
-
Structures and Unions ποΈ
- Structure Definition
- Member access
- Structure arrays
- Structure pointers
- Nested Structures
- Complex data structures
- Linked lists
- Trees and graphs
- Unions
- Memory sharing
- Type punning
- Union applications
- Structure Definition
-
File Handling π
- File Operations
- Opening and closing files
- File modes (read, write, append)
- Binary vs text files
- Reading and Writing Files
- Character I/O
- Formatted I/O
- Block I/O
- Error Handling
- EOF detection
- Error checking
- File position indicators
- File Operations
Each module includes practical examples:
- GCC Compiler
- Basic understanding of programming concepts
- Clone the repository:
git clone https://github.com/yourusername/c-programming-modules.git
cd c-programming-modules
- Navigate to any module directory:
cd modules/01-basic-syntax
- Compile a C program:
gcc example.c -o example
- Run the compiled program:
./example
c-programming-modules/
βββ modules/
β βββ 01-basic-syntax/
β βββ 02-arrays-and-strings/
β βββ 03-pointers/
β βββ 04-structures-and-unions/
β βββ 05-file-handling/
βββ exercises/
βββ examples/
Each module contains:
- Source code files (.c)
- Header files (.h)
- README with explanations
- Practice exercises
- Sample output
// ... rest of existing content ...
Contributions are welcome! Please feel free to:
- π΄ Fork the repository
- π§ Create a feature branch
- π Commit your changes
- π Push to the branch
- π Open a Pull Request
-
Beginner Level
- Basic syntax and data types
- Control structures
- Simple functions
- Arrays and strings
-
Intermediate Level
- Pointers
- Structures
- File operations
- Dynamic memory allocation
-
Advanced Level
- Advanced data structures
- Algorithm implementation
- System programming
- Memory management
// ... rest of existing content ...
If you have any questions or need help, please:
- Open an issue
- Contact: your.email@example.com
This project is licensed under the MIT License - see the LICENSE file for details.