Skip to content

Faisal786111/C-Language

Repository files navigation

C-Language πŸš€

GitHub Stars MIT License
Click to Star

✨ Don't forget to star the repo if you find it useful! ✨
Your stars motivate me to keep creating more content!

A comprehensive collection of C programming concepts, algorithms, and practical implementations

This repository contains all core concepts, code examples, and important programs related to C programming, structured topic-wise for easy understanding and reference.


πŸ“š Table of Contents


C Language Repository Structure

πŸ“‚ C-Language/ β”‚
β”œβ”€β”€ πŸ“ Common/
β”‚ └── Common header files (e.g., headers.h)
β”‚ β”œβ”€β”€ πŸ“ File_handling/
β”‚ └── File operations (fopen, fprintf, fscanf, fclose, etc.)
β”‚ β”œβ”€β”€ πŸ“ Functions/
β”‚ └── User-defined functions and prototypes
β”‚ β”œβ”€β”€ πŸ“ Global_vars/
β”‚ └── Examples using global variables
β”‚ β”œβ”€β”€ πŸ“ Malloc/
β”‚ └── Programs using malloc and dynamic memory
β”‚ β”œβ”€β”€ πŸ“ Pointers/
β”‚ └── Pointer-related concepts and programs
β”‚ β”œβ”€β”€ πŸ“ Problems/
β”‚ └── Practice problems (right angle star pattern, min of 3 numbers, etc.)
β”‚ β”œβ”€β”€ πŸ“ String/
β”‚ └── String operations (concatenation, copy, compare, etc.)
β”‚ β”œβ”€β”€ πŸ“ Topics/
β”‚ └── Theory or notes on different C topics
β”‚ β”œβ”€β”€ πŸ“ Type_casting/
β”‚ └── Type conversion and casting examples
β”‚ β”œβ”€β”€ πŸ“ Variadic_functions/
β”‚ └── Usage of variadic functions (va_list, va_arg, etc.)
β”‚ └── πŸ“„ README.md


βœ… Topics Covered

  • Pointers (Single, Double, Multilevel)
  • Malloc (Dynamic memory allocation for strings and arrays)
  • Strings (strcpy, strcat, strcmp, strlen, etc.)
  • Type casting (int↔char, float↔int, etc.)
  • Variadic Functions (va_list, va_start, va_arg, va_end)
  • Functions: declaration, prototyping, and definitions
  • Global variables and usage
  • Header file management (#include, #define, #if, etc.)
  • Custom header file linking (headers.h)
  • File I/O (reading and writing files)
  • Sorting (Merge Sort, Insertion Sort)
  • Simple logic problems (Fibonacci, factorial, min/max, etc.)

πŸš€ Getting Started

Follow these steps to set up and run the C programs:

1. Clone the Repository

git clone https://github.com/Faisal786111/C-Language.git
cd C-Language

2. Navigate to Specific Topic

# Example: Access pointers examples
cd Pointers/

# Or access sorting algorithms
cd Problems/Sorting/

3. Compile and Run

# Basic compilation
gcc program.c -o program

# Run the compiled program
./program

# Alternative one-line compilation and execution
gcc program.c -o output && ./output

πŸ™Œ Contributions

✨ We welcome all contributions! Here's how you can help:

  • 🍴 Fork the repository
  • πŸ› Report issues or suggest enhancements
  • πŸ’» Submit pull requests with:
    • New C programming examples
    • Algorithm optimizations
    • Improved documentation
  • πŸ“ Share ideas for new concepts to cover

πŸ”— Contribution Guidelines:

  1. Follow existing code style
  2. Add clear comments
  3. Include test cases where applicable
  4. Update relevant documentation

πŸ“œ License

MIT License
License: MIT