Skip to content

petsereypanha/c-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Programming Learning Repository

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.

📚 Repository Structure

1. Introduction (introduction/)

Basic C programming concepts and simple programs to get started:

  • example1.c - example6.c: Various introductory examples
  • ex3.c, ex4.c: Additional exercises

2. Arrays (array/)

Learn about arrays and their operations:

  • introduction.c: Basic array input/output operations
  • ArrayTwo.c: Two-dimensional arrays
  • student.c: Array applications with student data
  • Time.c: Time-related array implementations

3. Conditions (condition/)

Conditional statements and decision-making:

  • if.c: Simple if statements
  • If_else.c: If-else conditions
  • if_else_if.c: Multiple condition checking
  • Nested.if.c: Nested conditional statements
  • teraryoparater.c: Ternary operator usage
  • test1.if.c: Practice exercises

4. Loops (loop/)

Iteration and repetition structures:

  • while_loop.c: While loop examples
  • do_while_loop.c: Do-while loop implementations
  • forloop.c: For loop demonstrations
  • nested_loop.c: Nested loop patterns
  • lested_loop.c: Additional nested examples

5. Functions (function/)

Function declaration, definition, and usage:

  • introduction.c: Basic function concepts
  • value.c, value1.c: Pass by value
  • referent.c, referent1.c: Pass by reference
  • ALL.c: Comprehensive function examples

6. Pointers (pointer/)

Pointer concepts and memory management:

  • Address.c: Working with memory addresses
  • malloc.c: Dynamic memory allocation
  • calloc.c: Contiguous memory allocation
  • strlen.c: String length implementation
  • stricmp.c: String comparison

7. Structures (structure/)

User-defined data types and structures:

  • test1.c, test2.c: Basic structure examples
  • StructArray.c: Arrays of structures
  • SructPointer.c: Pointers to structures
  • Teacher_Pointer_Array.c: Complex structure implementations

8. File I/O (file/)

File handling operations:

  • text/Introductiob.c: File I/O introduction
  • text/read1.c: Reading from files
  • text/write1.c: Writing to files
  • text/test1_read.c, test1_write.c: Practice examples
  • text/test1.c: Combined file operations

🚀 Getting Started

Prerequisites

  • GCC compiler or any C compiler
  • Text editor or IDE (VS Code, Code::Blocks, Dev-C++, etc.)

Compiling and Running

To compile a C program:

gcc filename.c -o output

To run the compiled program:

./output

Example:

gcc introduction/example1.c -o hello
./hello

📖 Learning Path

If you're new to C programming, I recommend following this order:

  1. Start with Introduction - Get familiar with basic syntax
  2. Move to Conditions - Learn decision-making
  3. Practice Loops - Master iteration
  4. Explore Arrays - Work with data collections
  5. Learn Functions - Code organization and reusability
  6. Study Pointers - Memory management (challenging but crucial)
  7. Understand Structures - Complex data types
  8. Practice File I/O - Data persistence

💡 Tips for Learning C

  • 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

🛠️ Tools Used

  • C Compiler (GCC)
  • Text Editor/IDE
  • Terminal/Command Line

📝 Notes

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.

🤝 Contributing

This is a personal learning repository, but suggestions and improvements are always welcome!

📄 License

This repository is for educational purposes.


Happy Coding! 🚀

Last Updated: October 10, 2025

About

Basic Fundamentals C Programming

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages