<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C Programming on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/c-programming/</link><description>Recent content in C Programming on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 03 Nov 2025 01:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/c-programming/index.xml" rel="self" type="application/rss+xml"/><item><title>Chapter 1: Introduction to C Programming</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/introduction-to-c/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/introduction-to-c/</guid><description>&lt;h1 id="chapter-1-introduction-to-c-programming"&gt;Chapter 1: Introduction to C Programming&lt;/h1&gt;
&lt;p&gt;Welcome to the exciting world of C programming! If you&amp;rsquo;re coming from a background in web development or other high-level languages, C might seem a bit daunting at first. However, it&amp;rsquo;s a foundational language that will give you an unparalleled understanding of how computers actually work. This chapter will introduce you to C, explain why it&amp;rsquo;s still incredibly relevant, give you a brief historical overview, and guide you through setting up your very own C development environment.&lt;/p&gt;</description></item><item><title>Chapter 2: Core Concepts: Data Types, Variables, and Operators</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/core-concepts-data-types-variables-operators/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/core-concepts-data-types-variables-operators/</guid><description>&lt;h1 id="chapter-2-core-concepts-data-types-variables-and-operators"&gt;Chapter 2: Core Concepts: Data Types, Variables, and Operators&lt;/h1&gt;
&lt;p&gt;Now that your development environment is set up, it&amp;rsquo;s time to dive into the fundamental building blocks of C programming. In this chapter, we will explore:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data Types:&lt;/strong&gt; How C classifies different kinds of information (numbers, characters, etc.).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Variables:&lt;/strong&gt; How to store and name data in your programs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operators:&lt;/strong&gt; Symbols that perform operations on data (like addition, assignment, comparison).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These concepts are the ABCs of any programming language, and mastering them in C will provide a solid foundation for more complex topics.&lt;/p&gt;</description></item><item><title>Chapter 5: Pointers: The Heart of C</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/pointers-the-heart-of-c/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/pointers-the-heart-of-c/</guid><description>&lt;h1 id="chapter-5-pointers-the-heart-of-c"&gt;Chapter 5: Pointers: The Heart of C&lt;/h1&gt;
&lt;p&gt;Welcome to the most distinctive and powerful feature of C: &lt;strong&gt;pointers&lt;/strong&gt;. While intimidating for beginners, mastering pointers is fundamental to truly understanding C and low-level programming. Pointers allow you to directly interact with memory addresses, enabling advanced memory management, efficient data manipulation, and direct hardware interaction.&lt;/p&gt;
&lt;p&gt;In this chapter, we will demystify pointers by exploring:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What memory addresses are and how variables are stored.&lt;/li&gt;
&lt;li&gt;How to declare, initialize, and use pointers.&lt;/li&gt;
&lt;li&gt;The concepts of dereferencing and indirection.&lt;/li&gt;
&lt;li&gt;Pointer arithmetic and its applications.&lt;/li&gt;
&lt;li&gt;How pointers enable &amp;ldquo;pass-by-reference&amp;rdquo; in functions.&lt;/li&gt;
&lt;li&gt;Special types of pointers like &lt;code&gt;NULL&lt;/code&gt; and &lt;code&gt;void&lt;/code&gt; pointers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let&amp;rsquo;s confront the &amp;ldquo;dreaded&amp;rdquo; pointer head-on!&lt;/p&gt;</description></item><item><title>Chapter 8: Structures, Unions, and Enums: Custom Data Types</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/structures-unions-enums/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/structures-unions-enums/</guid><description>&lt;h1 id="chapter-8-structures-unions-and-enums-custom-data-types"&gt;Chapter 8: Structures, Unions, and Enums: Custom Data Types&lt;/h1&gt;
&lt;p&gt;So far, we&amp;rsquo;ve worked with primitive data types like &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;char&lt;/code&gt;, and arrays of these types. But real-world data is often more complex, requiring a way to group different types of information together. For instance, a &lt;code&gt;Student&lt;/code&gt; might have a name (string), an ID (integer), and a GPA (float).&lt;/p&gt;
&lt;p&gt;C provides tools to define your own &lt;strong&gt;custom data types&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Structures (&lt;code&gt;struct&lt;/code&gt;):&lt;/strong&gt; Allow you to group heterogeneous (different types) data items under a single name.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unions (&lt;code&gt;union&lt;/code&gt;):&lt;/strong&gt; Similar to structures, but all members share the &lt;em&gt;same&lt;/em&gt; memory location, allowing you to store different data types at different times in the same space.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enumerations (&lt;code&gt;enum&lt;/code&gt;):&lt;/strong&gt; Provide a way to create named integer constants, improving code readability.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This chapter will teach you how to define, declare, and use these powerful constructs.&lt;/p&gt;</description></item><item><title>Chapter 16: Guided Project: Simple Command-Line Calculator</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/project-command-line-calculator/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/project-command-line-calculator/</guid><description>&lt;h1 id="chapter-16-guided-project-simple-command-line-calculator"&gt;Chapter 16: Guided Project: Simple Command-Line Calculator&lt;/h1&gt;
&lt;p&gt;Welcome to your first guided project! The best way to solidify your understanding of C programming is by building something practical. In this project, we will create a &lt;strong&gt;simple command-line calculator&lt;/strong&gt;. This will allow you to apply many of the concepts we&amp;rsquo;ve covered so far:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Functions:&lt;/strong&gt; To encapsulate arithmetic operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control Flow:&lt;/strong&gt; For handling different operations and error conditions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Types and Operators:&lt;/strong&gt; For performing calculations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Command-Line Arguments (&lt;code&gt;argc&lt;/code&gt;, &lt;code&gt;argv&lt;/code&gt;):&lt;/strong&gt; For accepting user input.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;String to Number Conversion:&lt;/strong&gt; Using &lt;code&gt;atoi&lt;/code&gt; or &lt;code&gt;strtol&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal is to create a program that can be run from the terminal like this:&lt;/p&gt;</description></item><item><title>Chapter 17: Guided Project: Custom Memory Allocator</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/project-custom-memory-allocator/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/project-custom-memory-allocator/</guid><description>&lt;h1 id="chapter-17-guided-project-custom-memory-allocator"&gt;Chapter 17: Guided Project: Custom Memory Allocator&lt;/h1&gt;
&lt;p&gt;This project takes you deep into the heart of low-level C programming: &lt;strong&gt;memory management&lt;/strong&gt;. You&amp;rsquo;ve used &lt;code&gt;malloc()&lt;/code&gt; and &lt;code&gt;free()&lt;/code&gt; extensively, but have you ever wondered how they work? In this guided project, you will build a simplified version of a memory allocator.&lt;/p&gt;
&lt;p&gt;This project is significantly more complex than the calculator but offers unparalleled insights into:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pointers and Pointer Arithmetic:&lt;/strong&gt; Extensive use of raw memory addresses.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structures:&lt;/strong&gt; To define memory block metadata.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dynamic Memory Allocation:&lt;/strong&gt; Understanding &lt;code&gt;sbrk()&lt;/code&gt; (or similar system calls) for getting raw memory from the OS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory Layout:&lt;/strong&gt; How memory is organized and managed at a low level.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Error Handling:&lt;/strong&gt; Crucial for robust memory management.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; This will be a &lt;em&gt;very basic&lt;/em&gt; allocator. Real-world &lt;code&gt;malloc&lt;/code&gt; implementations are highly optimized and complex, involving techniques like freelists, memory pools, mutexes for thread safety, and elaborate block splitting/merging algorithms. Our goal is conceptual understanding.&lt;/p&gt;</description></item><item><title>Chapter 18: Bonus Section: Further Learning and Resources</title><link>https://ai-blog.noorshomelab.dev/c-programming-guide/further-learning-and-resources/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/c-programming-guide/further-learning-and-resources/</guid><description>&lt;h1 id="chapter-18-bonus-section-further-learning-and-resources"&gt;Chapter 18: Bonus Section: Further Learning and Resources&lt;/h1&gt;
&lt;p&gt;Congratulations! You&amp;rsquo;ve successfully navigated through this comprehensive guide to C programming, from the absolute basics to advanced topics like pointers, memory management, and even interfacing with Assembly. You&amp;rsquo;ve built a solid foundation in low-level computing.&lt;/p&gt;
&lt;p&gt;Learning C is a journey, not a destination. There&amp;rsquo;s always more to explore, more to build, and more to optimize. This bonus section provides a curated list of resources to help you continue your learning and deepen your expertise.&lt;/p&gt;</description></item><item><title>Learn C Programming Guide</title><link>https://ai-blog.noorshomelab.dev/guides/learn-c-programming-guide/</link><pubDate>Mon, 03 Nov 2025 01:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/guides/learn-c-programming-guide/</guid><description>&lt;h1 id="learn-c-programming-a-comprehensive-guide"&gt;Learn C Programming: A Comprehensive Guide&lt;/h1&gt;
&lt;p&gt;Welcome to the &lt;strong&gt;Learn C Programming Guide&lt;/strong&gt;! This document is designed for absolute beginners with a background in general software development (e.g., web development) who want to dive into the world of low-level programming using the C language. C is a powerful and efficient language that forms the backbone of countless systems, from operating systems and embedded devices to high-performance computing.&lt;/p&gt;
&lt;p&gt;In this guide, you will embark on a journey from understanding the very basics of C to tackling advanced concepts and building practical projects. We will cover fundamental building blocks like memory and pointers, explore the new features introduced in the C23 standard, and provide you with hands-on exercises to solidify your learning. By the end of this guide, you will have a strong foundation in C programming and a deeper appreciation for how software interacts with hardware.&lt;/p&gt;</description></item></channel></rss>