Skip to content

SamratVsn/C-codes

Repository files navigation

C-codes

A collection of C programming experiments and mini-projects

A hands-on repository where I explore C programming fundamentals through practical console applications. Each program demonstrates core concepts like user input, control flow, file handling, and problem-solving in C.


💡 About

This repository serves as my C programming playground — a place to experiment, learn, and build small but functional programs. From calculators to games to management systems, each project tackles different aspects of C programming.

Why C? It's the foundation. Understanding C means understanding how computers work at a fundamental level — memory, pointers, and the raw power of systems programming.


📂 Projects

🧮 Calculator

File: Calculator.c

A simple arithmetic calculator supporting basic operations: addition, subtraction, multiplication, and division.

Concepts: Functions, switch statements, user input validation


🎲 GUESS It

File: GUESS_It.c

A number guessing game where the program generates a random number and you try to guess it within limited attempts.

Concepts: Random number generation, loops, conditional logic


🎓 Student Management System

File: Student_Management.c

A console-based student records management system. Add, view, and store student information persistently.

Concepts: Structures, file I/O, data persistence (Student_Details.txt)


🕐 Digital Clock

File: digiClock.c

A real-time digital clock display that updates every second in the console.

Concepts: Time handling, system calls, console manipulation


🚀 Getting Started

Prerequisites

  • A C compiler (GCC, Clang, or MSVC)
  • Terminal/Command Prompt access

Compilation & Execution

Using GCC (Linux/Mac/Windows with MinGW):

# Navigate to the repository
cd C-codes

# Compile any program
gcc Calculator.c -o Calculator

# Run the executable
./Calculator          # Linux/Mac
Calculator.exe        # Windows

Quick compile and run:

gcc Calculator.c -o Calculator && ./Calculator

IDE Setup

You can also open these files in:

  • VS Code (with C/C++ extension)
  • Code::Blocks
  • CLion
  • Dev-C++

📚 What I'm Learning

Through these projects, I'm building skills in:

  • Core C Syntax: Variables, data types, operators
  • Control Flow: If-else, switch, loops
  • Functions: Modular programming and code reuse
  • Data Structures: Arrays, structures
  • File I/O: Reading from and writing to files
  • Memory Management: Understanding pointers and memory
  • Problem Solving: Breaking down real-world problems into code

🛠️ Repository Structure

C-codes/
├── Calculator.c              # Simple calculator program
├── GUESS_It.c               # Number guessing game
├── Student_Management.c     # Student records system
├── digiClock.c              # Digital clock display
├── Student_Details.txt      # Data file for student records
├── .vscode/                 # VS Code configuration
└── build/                   # Compiled binaries

🔄 Future Additions

Projects I'm planning to add:

  • File encryption/decryption tool
  • Simple text editor
  • Tic-Tac-Toe game
  • Bank management system
  • Data structures implementations (linked lists, stacks, queues)

🤝 Contributing

This is primarily a personal learning repository, but suggestions and improvements are welcome! Feel free to:

  • Open an issue if you spot a bug
  • Suggest new project ideas
  • Share optimization tips

📝 Notes

  • .exe files: Pre-compiled Windows executables (included for convenience)
  • tempCodeRunnerFile.c: Temporary file generated by Code Runner extension
  • File persistence: Some programs (like Student Management) create and use .txt files for data storage

📄 License

This project is open source and available for educational purposes.


"In C, you get what you ask for — no more, no less. That's the beauty of it."

About

I will try many C projects here

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages