<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AP09</title>
    <description>The latest articles on DEV Community by AP09 (@ap_09).</description>
    <link>https://dev.to/ap_09</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4013223%2F38743b5d-3adb-4024-9350-ab0c3a76cb29.jpg</url>
      <title>DEV Community: AP09</title>
      <link>https://dev.to/ap_09</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ap_09"/>
    <language>en</language>
    <item>
      <title>Understanding Data Types and Operators in C: The Foundation Every Beginner Should Master</title>
      <dc:creator>AP09</dc:creator>
      <pubDate>Tue, 14 Jul 2026 18:15:10 +0000</pubDate>
      <link>https://dev.to/ap_09/understanding-data-types-and-operators-in-c-the-foundation-every-beginner-should-master-4o9k</link>
      <guid>https://dev.to/ap_09/understanding-data-types-and-operators-in-c-the-foundation-every-beginner-should-master-4o9k</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you're learning C f, this is one topic you simply can't skip. Every C program—whether it's a simple calculator or a complex operating system—starts with data and the operations performed on it.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When I started learning C, I was eager to jump straight into loops, functions, and data structures. But after solving a few programming problems, I realized something important: most beginner mistakes happen because we don't fully understand &lt;strong&gt;data types&lt;/strong&gt; and &lt;strong&gt;operators&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These may seem like basic concepts, but they are the building blocks of everything you'll write in C.&lt;/p&gt;

&lt;p&gt;Let's understand them in a simple way.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Exactly Is Data?
&lt;/h1&gt;

&lt;p&gt;Every program works with information.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your age&lt;/li&gt;
&lt;li&gt;Your exam marks&lt;/li&gt;
&lt;li&gt;A student's name&lt;/li&gt;
&lt;li&gt;The price of a product&lt;/li&gt;
&lt;li&gt;The temperature outside&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these are pieces of data. A computer doesn't understand these values unless we tell it &lt;strong&gt;what kind of data they are&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That's where data types come in.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Is a Data Type?
&lt;/h1&gt;

&lt;p&gt;Think about moving to a new house.&lt;/p&gt;

&lt;p&gt;You wouldn't pack books, clothes, and fragile glass items into the same box. Instead, you'd label different boxes according to what's inside.&lt;/p&gt;

&lt;p&gt;A C compiler does something similar.&lt;/p&gt;

&lt;p&gt;Before storing any value, it needs to know what kind of information it is dealing with.&lt;/p&gt;

&lt;p&gt;That's the job of a &lt;strong&gt;data type&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A data type tells the compiler:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what kind of value will be stored,&lt;/li&gt;
&lt;li&gt;how much memory should be reserved,&lt;/li&gt;
&lt;li&gt;what range of values is allowed, and&lt;/li&gt;
&lt;li&gt;what operations can safely be performed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without data types, the compiler would have no idea how to interpret the data stored in memory.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Do Data Types Matter?
&lt;/h1&gt;

&lt;p&gt;Imagine storing the number &lt;code&gt;5&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now imagine storing &lt;code&gt;98765432123456789&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If the computer reserved the same amount of memory for both values, it would waste a lot of space.&lt;/p&gt;

&lt;p&gt;Different data types allow C to use memory efficiently while also improving performance.&lt;/p&gt;

&lt;p&gt;This design is one of the reasons C is still used for operating systems, embedded systems, and performance-critical software.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Four Basic Data Types in C
&lt;/h1&gt;

&lt;p&gt;Let's look at the four primary data types every beginner should know.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. int — For Whole Numbers
&lt;/h2&gt;

&lt;p&gt;Whenever you need to store numbers without decimal places, use &lt;code&gt;int&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Examples of integer values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0
25
-100
9999
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On most modern systems, an &lt;code&gt;int&lt;/code&gt; occupies &lt;strong&gt;4 bytes&lt;/strong&gt; of memory.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. char — For Single Characters
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;char&lt;/code&gt; stores exactly one character.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;grade&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'A'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'#'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the use of &lt;strong&gt;single quotes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Internally, characters are stored as numbers using the ASCII character set.&lt;/p&gt;

&lt;p&gt;For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'A' → 65
'B' → 66
'a' → 97
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's why this program prints &lt;code&gt;66&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'B'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. float — For Decimal Numbers
&lt;/h2&gt;

&lt;p&gt;Need to store values like temperature or percentages?&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;float&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;pi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A float usually occupies &lt;strong&gt;4 bytes&lt;/strong&gt; and provides around &lt;strong&gt;6–7 digits of precision&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. double — When You Need More Precision
&lt;/h2&gt;

&lt;p&gt;Sometimes a float isn't accurate enough.&lt;/p&gt;

&lt;p&gt;That's where &lt;code&gt;double&lt;/code&gt; comes in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;pi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;141592653589793&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A double generally occupies &lt;strong&gt;8 bytes&lt;/strong&gt; and can represent approximately &lt;strong&gt;15 decimal digits&lt;/strong&gt; accurately.&lt;/p&gt;

&lt;p&gt;If precision matters, prefer &lt;code&gt;double&lt;/code&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  A Common Beginner Confusion: Why Doesn't &lt;code&gt;0.7 == 0.7&lt;/code&gt;?
&lt;/h1&gt;

&lt;p&gt;Consider this code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Equal"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
    &lt;span class="nf"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Not Equal"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Many beginners expect the output to be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Equal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But on many systems, you'll actually see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Not Equal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because computers store floating-point numbers in binary.&lt;/p&gt;

&lt;p&gt;Some decimal numbers—like &lt;strong&gt;0.7&lt;/strong&gt;—cannot be represented exactly in binary, so they are stored as the closest possible approximation.&lt;/p&gt;

&lt;p&gt;That tiny approximation makes direct comparisons unreliable.&lt;/p&gt;

&lt;p&gt;Interestingly, this program usually works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Equal"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's because &lt;strong&gt;0.5&lt;/strong&gt; has an exact binary representation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Avoid comparing floating-point numbers directly using &lt;code&gt;==&lt;/code&gt;. Comparing the difference against a very small value (epsilon) is usually a better approach.&lt;/p&gt;




&lt;h1&gt;
  
  
  Using &lt;code&gt;sizeof&lt;/code&gt; to See Memory Usage
&lt;/h1&gt;

&lt;p&gt;C provides a very useful operator called &lt;code&gt;sizeof&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It tells us how many bytes a variable or data type occupies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%zu"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Possible output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use it with variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%zu"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;marks&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One interesting example is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%zu"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4
5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that &lt;code&gt;x&lt;/code&gt; remains unchanged.&lt;/p&gt;

&lt;p&gt;That's because &lt;code&gt;sizeof&lt;/code&gt; determines the size from the variable's type—it doesn't execute the expression inside it.&lt;/p&gt;




&lt;h1&gt;
  
  
  Variables vs Constants
&lt;/h1&gt;

&lt;p&gt;A variable can change during program execution.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A constant cannot.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;14159&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Constants make programs easier to read and prevent accidental modification.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Are Operators?
&lt;/h1&gt;

&lt;p&gt;If variables are the nouns of programming, operators are the verbs.&lt;/p&gt;

&lt;p&gt;They tell the computer what action to perform.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding numbers&lt;/li&gt;
&lt;li&gt;Comparing values&lt;/li&gt;
&lt;li&gt;Assigning data&lt;/li&gt;
&lt;li&gt;Checking conditions&lt;/li&gt;
&lt;li&gt;Performing logical operations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without operators, a program would simply store data without doing anything useful.&lt;/p&gt;




&lt;h1&gt;
  
  
  Arithmetic Operators
&lt;/h1&gt;

&lt;p&gt;These perform mathematical calculations.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operator&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;Addition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Subtraction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;td&gt;Multiplication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;td&gt;Division&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;%&lt;/td&gt;
&lt;td&gt;Remainder (Modulus)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;23
17
60
6
2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that &lt;code&gt;20 / 3&lt;/code&gt; gives &lt;code&gt;6&lt;/code&gt;, not &lt;code&gt;6.67&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Since both operands are integers, C performs &lt;strong&gt;integer division&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  Relational Operators
&lt;/h1&gt;

&lt;p&gt;These compare two values.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operator&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;==&lt;/td&gt;
&lt;td&gt;Equal to&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;!=&lt;/td&gt;
&lt;td&gt;Not equal to&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;gt;&lt;/td&gt;
&lt;td&gt;Greater than&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;&lt;/td&gt;
&lt;td&gt;Less than&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;gt;=&lt;/td&gt;
&lt;td&gt;Greater than or equal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;=&lt;/td&gt;
&lt;td&gt;Less than or equal&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In C,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;1&lt;/code&gt; means &lt;strong&gt;true&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;0&lt;/code&gt; means &lt;strong&gt;false&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Logical Operators
&lt;/h1&gt;

&lt;p&gt;Logical operators combine multiple conditions.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operator&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;amp;&amp;amp;&lt;/td&gt;
&lt;td&gt;AND&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;!&lt;/td&gt;
&lt;td&gt;NOT&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Eligible"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both conditions must be true.&lt;/p&gt;




&lt;h1&gt;
  
  
  Assignment Operators
&lt;/h1&gt;

&lt;p&gt;The basic assignment operator is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="o"&gt;=&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But C also provides shorthand versions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="o"&gt;+=&lt;/span&gt;
&lt;span class="o"&gt;-=&lt;/span&gt;
&lt;span class="o"&gt;*=&lt;/span&gt;
&lt;span class="o"&gt;/=&lt;/span&gt;
&lt;span class="o"&gt;%=&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is simply another way of writing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Pre-Increment vs Post-Increment
&lt;/h1&gt;

&lt;p&gt;These two operators often confuse beginners.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pre-increment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value is increased first, then used.&lt;/p&gt;




&lt;h3&gt;
  
  
  Post-increment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"%d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the statement finishes, &lt;code&gt;x&lt;/code&gt; becomes &lt;code&gt;6&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The increment happens after the current value is used.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Conditional (Ternary) Operator
&lt;/h1&gt;

&lt;p&gt;Instead of writing a complete &lt;code&gt;if-else&lt;/code&gt;, you can write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;condition&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;expression1&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;expression2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Adult"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Minor"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's compact and useful for simple decisions.&lt;/p&gt;




&lt;h1&gt;
  
  
  Beginner Mistakes Worth Avoiding
&lt;/h1&gt;

&lt;p&gt;Here are a few mistakes almost everyone makes while learning C.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 1: Using &lt;code&gt;=&lt;/code&gt; instead of &lt;code&gt;==&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Incorrect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Correct:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Mistake 2: Comparing floating-point numbers directly
&lt;/h3&gt;

&lt;p&gt;Avoid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Floating-point numbers often contain tiny precision errors.&lt;/p&gt;




&lt;h3&gt;
  
  
  Mistake 3: Expecting decimal results from integer division
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use at least one floating-point operand.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Key Takeaways
&lt;/h1&gt;

&lt;p&gt;Let's quickly recap what we learned.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data types define what kind of information a variable stores.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;int&lt;/code&gt;, &lt;code&gt;char&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, and &lt;code&gt;double&lt;/code&gt; are the primary data types every beginner should know.&lt;/li&gt;
&lt;li&gt;Operators allow us to perform calculations, comparisons, assignments, and logical decisions.&lt;/li&gt;
&lt;li&gt;Floating-point comparisons require extra care because not every decimal number can be represented exactly.&lt;/li&gt;
&lt;li&gt;Understanding these fundamentals will make topics like arrays, pointers, functions, and data structures much easier to learn.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every experienced C programmer once struggled with these basics. Spending a little extra time mastering them now will save you hours of debugging later.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;In the next article, I'll cover &lt;strong&gt;Control Statements in C&lt;/strong&gt;, where we'll learn how programs make decisions using &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;switch&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, and &lt;code&gt;do-while&lt;/code&gt; loops.&lt;/p&gt;

&lt;p&gt;If you're also learning C or preparing for &lt;strong&gt;GATE CSE&lt;/strong&gt;, I'd love to know—what topic should we explore after control statements?&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Understanding the Building Blocks of C Programming</title>
      <dc:creator>AP09</dc:creator>
      <pubDate>Mon, 13 Jul 2026 17:38:36 +0000</pubDate>
      <link>https://dev.to/ap_09/understanding-the-building-blocks-of-c-programming-3l62</link>
      <guid>https://dev.to/ap_09/understanding-the-building-blocks-of-c-programming-3l62</guid>
      <description>&lt;p&gt;&lt;strong&gt;Before learning about programming in C ,lets understand what does programming means ?&lt;/strong&gt;&lt;br&gt;
Programming is set of logically grouped instructions given to computer so that it understands it and execute it.&lt;br&gt;
Computers are incredibly fast and accurate, but they have one limitation they cannot decide what task to perform without instructions, programming gives the instruction to the computer to perform some task&lt;/p&gt;
&lt;h2&gt;
  
  
  WHY I STARTED WITH C ?
&lt;/h2&gt;

&lt;p&gt;C is still an influential language and most high level modern languages have been inspired by c.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most operating systems are written largely in C because it provides direct control over hardware while remaining portable.&lt;/li&gt;
&lt;li&gt;Small computers inside everyday devices are often programmed in C.&lt;/li&gt;
&lt;li&gt;Programs that translate programming languages are often written in C or C++.
c is faster than most of the high level languages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**&lt;/p&gt;
&lt;h2&gt;
  
  
  HELLO WORLD IN C
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
`#include &lt;br&gt;
 int main()&lt;br&gt;
 { &lt;br&gt;
printf("Hello, World!");&lt;br&gt;
 return 0; &lt;br&gt;
}&lt;br&gt;
&lt;strong&gt;Line 1:&lt;/strong&gt; #include &lt;/p&gt;
&lt;h1&gt;
  
  
  include 
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What is #include?&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  include is a preprocessor directive.
&lt;/h1&gt;

&lt;p&gt;A preprocessor is a program that runs before the actual compiler. It processes special instructions that begin with #.&lt;/p&gt;

&lt;p&gt;Think of it as a helper that prepares your code before compilation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does include mean?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The word include literally means "bring something into the program."&lt;/p&gt;

&lt;p&gt;Here, we're asking the preprocessor:&lt;/p&gt;

&lt;p&gt;"Please include the contents of the stdio.h header file before compiling my program."&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What is stdio.h?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
stdio stands for:&lt;/p&gt;

&lt;p&gt;Standard Input Output&lt;/p&gt;

&lt;p&gt;The .h means it is a header file.&lt;/p&gt;

&lt;p&gt;This header file contains declarations for many input/output functions such as:&lt;/p&gt;

&lt;p&gt;printf()&lt;br&gt;
scanf()&lt;br&gt;
getchar()&lt;br&gt;
putchar()&lt;/p&gt;

&lt;p&gt;Without this header file, the compiler won't know about these functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why are angle brackets (&amp;lt; &amp;gt;) used?&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  include 
&lt;/h1&gt;

&lt;p&gt;The angle brackets tell the compiler:&lt;/p&gt;

&lt;p&gt;"Look for this header file in the system's standard library."&lt;/p&gt;

&lt;p&gt;If you create your own header file, you usually write:&lt;/p&gt;
&lt;h1&gt;
  
  
  include "myfile.h"
&lt;/h1&gt;

&lt;p&gt;The double quotes tell the compiler to search the current project folder first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens internally?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose stdio.h contains thousands of lines of declarations.&lt;/p&gt;

&lt;p&gt;The preprocessor copies those declarations into your source file before compilation.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;/p&gt;

&lt;p&gt;Before preprocessing:&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;After preprocessing (simplified):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;c&lt;br&gt;
/&lt;/code&gt;* Thousands of declarations from stdio.h */&lt;/p&gt;

&lt;p&gt;int printf(const char *, ...);&lt;/p&gt;

&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;int main()&lt;br&gt;
{&lt;br&gt;
    printf("Hello");&lt;br&gt;
}&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  *&lt;em&gt;KEYWORDS *&lt;/em&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;This are the reserve words of every language which have some specific meaning and user can not use them for any other purpose.&lt;/li&gt;
&lt;li&gt;Example: int,char,float,char,switch  etc.&lt;/li&gt;
&lt;li&gt;There are 32 keywords in C.&lt;/li&gt;
&lt;li&gt;Also C is a case sensitive lanhuahe so if and IF are not same they are different , if is a keyword while IF is not a keyword.
Why should we know the key words of any programming language ? 
That just because while naming variables we should avoid key words else it will create some error.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  VARIABLES AND CONSTANT
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Variable is a type of container which is used to hold a particular type of value and this type is defined by its data type.&lt;br&gt;
For example : int x;&lt;br&gt;
                 x is a variable of integer type so it can hold only one integer value at a time&lt;br&gt;
 whenever a variable is defined , memory is alocated for it &lt;/p&gt;

&lt;p&gt;CONSTANTS are the value assigned to the variable &lt;br&gt;
For example: int x,y;&lt;br&gt;
            x=5; // 5 is assigned to x so 5 is a constant.&lt;/p&gt;

&lt;p&gt;_Final Thoughts&lt;br&gt;
_&lt;br&gt;
_Strong fundamentals are the foundation of every great programmer. The time you invest in understanding the basics today will make advanced concepts much easier tomorrow.&lt;/p&gt;

&lt;p&gt;Thank you for reading. See you in the next article as we continue exploring programming in c for absolute begineers._&lt;br&gt;
_&lt;/p&gt;

&lt;p&gt;_"Every expert programmer once wrote their first Hello, World! program."&lt;br&gt;
_ &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>Documenting My Journey Through Computer Science, Software Development, and Problem Solving</title>
      <dc:creator>AP09</dc:creator>
      <pubDate>Sun, 12 Jul 2026 17:08:43 +0000</pubDate>
      <link>https://dev.to/ap_09/documenting-my-journey-through-computer-science-software-development-and-problem-solving-3297</link>
      <guid>https://dev.to/ap_09/documenting-my-journey-through-computer-science-software-development-and-problem-solving-3297</guid>
      <description>&lt;p&gt;While learning core computer science subjects or development or any tech stack understanding algorithms, programming languages and mathematics is not the hardest part the hardest part is to stay consistent and stay sticked to the goal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Am I Writing?&lt;/strong&gt;&lt;br&gt;
Like many aspiring developers, I've started countless courses, begun exciting projects, and promised myself I'd stay consistent with programming practice. But more often than I'd like to admit, I left them unfinished. I wasn't lacking interest—I was lacking consistency.&lt;/p&gt;

&lt;p&gt;This time, I'm taking a different approach.&lt;/p&gt;

&lt;p&gt;I've decided to document my entire learning journey publicly. Here, I'll share my progress, the lessons I learn, the mistakes I make, and the milestones I achieve. I'll also write blogs explaining computer science concepts, data structures and algorithms, mathematical theories, and the ideas behind the projects I build.&lt;/p&gt;

&lt;p&gt;My hope is that writing about what I learn will keep me accountable, deepen my understanding, and maybe even help someone else who is on the same path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What You Can Expect&lt;/strong&gt;&lt;br&gt;
Over the coming months, I'll be writing daily ,i will write minimum 1 blog dailway for the upcoming 200 days , about the topics I'm studying and the projects I'm building.&lt;/p&gt;

&lt;p&gt;Some of the areas I'll cover include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Structures and Algorithms&lt;/li&gt;
&lt;li&gt;Core Computer Science subjects&lt;/li&gt;
&lt;li&gt;Mathematics for Computer Science&lt;/li&gt;
&lt;li&gt;Backend and Full-Stack Development&lt;/li&gt;
&lt;li&gt;Data Analytics&lt;/li&gt;
&lt;li&gt;Real-world development projects&lt;/li&gt;
&lt;li&gt;Lessons learned from debugging and problem solving&lt;/li&gt;
&lt;li&gt;Productivity, consistency, and my learning process&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll will be using this is platform to create digital notes that will be easy to understand and will explain fundamental and complex topics of computer science.&lt;/p&gt;

&lt;p&gt;I &lt;strong&gt;believe in building in public&lt;/strong&gt;. Now, &lt;strong&gt;I'm choosing to learn in public.&lt;/strong&gt;&lt;br&gt;
Every concept I master, every project I build, every mistake I make, and every lesson I learn will become a part of this journey.&lt;br&gt;
This is Day 1—not of becoming an expert, but of refusing to quit.&lt;/p&gt;

&lt;p&gt;See you in the next post.&lt;br&gt;
&lt;code&gt;Until then, keep learning, keep building, and keep showing up.&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
written by - AP09 - DAY 01&lt;/p&gt;

</description>
      <category>beginners</category>
    </item>
  </channel>
</rss>
