{"id":34532046,"url":"https://github.com/kibet-rotich/c-learning","last_synced_at":"2026-05-25T13:04:20.811Z","repository":{"id":326615535,"uuid":"1102662789","full_name":"Kibet-Rotich/C-Learning","owner":"Kibet-Rotich","description":"A deep dive into C and C++ fundamentals, documenting my journey through K\u0026R C, manual memory management, and custom data structures like BSTs.","archived":false,"fork":false,"pushed_at":"2026-03-07T11:12:13.000Z","size":15452,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-07T17:56:06.050Z","etag":null,"topics":["binary-search-tree","c","cpp","data-structures","memory-management","pointers"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kibet-Rotich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-23T21:20:28.000Z","updated_at":"2026-03-07T11:12:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Kibet-Rotich/C-Learning","commit_stats":null,"previous_names":["kibet-rotich/c-learning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kibet-Rotich/C-Learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kibet-Rotich%2FC-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kibet-Rotich%2FC-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kibet-Rotich%2FC-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kibet-Rotich%2FC-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kibet-Rotich","download_url":"https://codeload.github.com/Kibet-Rotich/C-Learning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kibet-Rotich%2FC-Learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33475796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:32:55.349Z","status":"ssl_error","status_checked_at":"2026-05-25T06:32:35.322Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-search-tree","c","cpp","data-structures","memory-management","pointers"],"created_at":"2025-12-24T05:48:13.553Z","updated_at":"2026-05-25T13:04:20.805Z","avatar_url":"https://github.com/Kibet-Rotich.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 Low-Level Programming \u0026 Data Structures Journey\r\n\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/Languages-C%20%7C%20C%2B%2B-blue?style=for-the-badge\" /\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/Focus-Memory%20Management-red?style=for-the-badge\" /\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/Status-K%26R%20Deep%20Dive-success?style=for-the-badge\" /\u003e\r\n\u003c/p\u003e\r\n\r\nWelcome to my learning repository. While I initially started with **C++**, I decided to take a step back into **C** to build a rock-solid understanding of memory management, pointers, and the \"under-the-hood\" mechanics that make C++ so powerful.\r\n\r\nThis repo documents my path through the **K\u0026R (Kernighan \u0026 Ritchie)** curriculum and my implementation of fundamental data structures from scratch.\r\n\r\n---\r\n\r\n## 📁 Project Roadmap\r\n\r\n### 🏛️ The C Foundation (K\u0026R Progress)\r\n- **Basic Syntax \u0026 Types:** Operators, loops, and control flow.\r\n- **Functions \u0026 Program Structure:** External variables and scope.\r\n- **Pointers \u0026 Arrays:** Deep dive into pointer arithmetic and memory addresses.\r\n- **Structures:** Building custom data types and complex models.\r\n- **Input/Output:** Mastering `stdio.h` and file streams.\r\n\r\n### 🏗️ Data Structures from Scratch\r\n- **Binary Search Trees (BST):** Alphabetical Contact Management System with `malloc` and recursion.\r\n- **Dynamic Lists:** Custom implementations of resizable arrays.\r\n- **Memory Management:** Safe allocation/deallocation using `malloc`, `free`, `new`, and `delete`.\r\n\r\n---\r\n\r\n## 🧱 Key Projects\r\n\r\n### 📈 [Linear Regression with C \u0026 Python Interface](./Linear%20regression/README.md)\r\nA hybrid project showcasing a **linear regression algorithm implemented in C** with a Python test script for interfacing.\r\n- **Features:** Train a linear regression model and predict outcomes using the compiled C code.\r\n- **Interoperability:** Includes a `test.py` script demonstrating how to call the C functions from Python, combining C performance with Python flexibility.\r\n\r\n### 📱 [BST Phonebook (C)](./C/phonebook.c)\r\nA command-line application using a **Binary Search Tree** to store and search contacts.\r\n- **Complexity:** $O(\\log n)$ average time for search and insertion.\r\n- **Features:** Alphabetical insertion using `strcmp`, In-order DFS traversal for listing, and manual Post-order heap memory cleanup.\r\n\r\n### 📝 [Student Ledger (C)](./C/student%20ledger.c)\r\nA persistent storage application demonstrating the use of the **Standard I/O Library** (`stdio.h`).\r\n- **Features:** File stream management using `fopen`, `fprintf`, and `getc`.\r\n- **Persistence:** Appends records to a `.txt` database, allowing data to survive between program executions.\r\n\r\n### 🔢 [Vector Simulation (C++)](./C++/vector%20simulation.cpp)\r\nA custom implementation of a dynamic array, mimicking the behavior of `std::vector` to understand how the STL manages capacity and resizing.\r\n\r\n## 🛠 Toolset \u0026 Workflow\r\n\r\n- **Compiler:** `gcc` for C, `g++` for C++.\r\n- **Environment:** Linux/Unix-based CLI.\r\n- **Memory Safety:** Manual tracking of heap allocations to prevent memory leaks (checked via `freeTree` logic).\r\n\r\n```bash\r\n# To compile the C Phonebook\r\ngcc phonebook.c -o phonebook\r\n./phonebook\r\n```\r\n\r\n## 🎯 The Vision\r\n\r\n\u003e \"To understand C++ at a deeper level, one must first respect the power of C.\"\r\n\r\nMy goal is to complete the K\u0026R curriculum and then transition those low-level skills into Modern C++ (C++11/14/17/20), focusing on:\r\n\r\n- **RAII** (Resource Acquisition Is Initialization)\r\n- **Smart Pointers** (Unique, Shared)\r\n- **Templates \u0026 Meta-programming**\r\n- **The STL Architecture**\r\n\r\n## 🙌 Contributions \u0026 Learning\r\n\r\nThis is a living documentation of my computer science journey at JKUAT. Feedback on my pointer logic or memory management is always appreciated!\r\n\r\n\r\n⭐ If you find this helpful, consider starring the repo!\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkibet-rotich%2Fc-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkibet-rotich%2Fc-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkibet-rotich%2Fc-learning/lists"}