<?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: Sandeep</title>
    <description>The latest articles on DEV Community by Sandeep (@sandeep_a67a84444cb5f3f6f).</description>
    <link>https://dev.to/sandeep_a67a84444cb5f3f6f</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2354304%2Fbcc7f365-8f96-45fa-8e90-f61b4723e630.jpg</url>
      <title>DEV Community: Sandeep</title>
      <link>https://dev.to/sandeep_a67a84444cb5f3f6f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sandeep_a67a84444cb5f3f6f"/>
    <language>en</language>
    <item>
      <title>Linked list ?</title>
      <dc:creator>Sandeep</dc:creator>
      <pubDate>Sat, 04 Oct 2025 13:56:08 +0000</pubDate>
      <link>https://dev.to/sandeep_a67a84444cb5f3f6f/linked-list--4cp8</link>
      <guid>https://dev.to/sandeep_a67a84444cb5f3f6f/linked-list--4cp8</guid>
      <description>&lt;h2&gt;
  
  
  What is a Linked List?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;linked list&lt;/strong&gt; is a linear data structure where elements, called &lt;strong&gt;nodes&lt;/strong&gt;, are connected using pointers. Unlike arrays, linked lists allow &lt;strong&gt;easy insertion and deletion&lt;/strong&gt; of elements without shifting other elements, making them more flexible in certain scenarios.  &lt;/p&gt;




&lt;h1&gt;
  
  
  Where to Use a Linked List vs an Array
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Arrays&lt;/strong&gt; are suitable when:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Random access by index is required frequently.
&lt;/li&gt;
&lt;li&gt;The size of the data structure is known in advance or changes infrequently.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Linked Lists&lt;/strong&gt; are preferred when:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Insertions and deletions are the primary operations.
&lt;/li&gt;
&lt;li&gt;The order of elements must be maintained.
&lt;/li&gt;
&lt;li&gt;The size of the data is dynamic or unknown.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In general, if you need quick access to elements via indices, use an &lt;strong&gt;array&lt;/strong&gt;; if you need efficient insertions/deletions, use a &lt;strong&gt;linked list&lt;/strong&gt;.  &lt;/p&gt;




&lt;h1&gt;
  
  
  Structure of a Linked List
&lt;/h1&gt;

&lt;p&gt;A linked list is composed of &lt;strong&gt;nodes&lt;/strong&gt;, where each node contains:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Data segment&lt;/strong&gt; – stores the value or information.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pointer (reference) segment&lt;/strong&gt; – points to the next node in the sequence.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This &lt;strong&gt;self-referential structure&lt;/strong&gt; allows nodes to form a chain, enabling dynamic memory allocation and efficient insertion/deletion operations.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Common Operations on Linked Lists
&lt;/h2&gt;

&lt;p&gt;Some basic operations that can be performed on linked lists include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Insertion&lt;/strong&gt; – Add a new node at the beginning, end, or any given position.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deletion&lt;/strong&gt; – Remove a node by its value or position.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traversal&lt;/strong&gt; – Visit each node to access or print data.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Searching&lt;/strong&gt; – Find a specific element in the list.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reversing&lt;/strong&gt; – Reverse the order of nodes in the list.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Types of Linked Lists
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Singly Linked List&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each node has a pointer to the &lt;strong&gt;next node&lt;/strong&gt; only.
&lt;/li&gt;
&lt;li&gt;The list starts with a &lt;strong&gt;head pointer&lt;/strong&gt; and ends with &lt;code&gt;null&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;Traversal is one-way, from the head to the last node.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Doubly Linked List&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each node contains &lt;strong&gt;two pointers&lt;/strong&gt;: one pointing to the &lt;strong&gt;next node&lt;/strong&gt; and one pointing to the &lt;strong&gt;previous node&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Traversal is possible in both directions.
&lt;/li&gt;
&lt;li&gt;Updating nodes is easier compared to singly linked lists.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Circular Linked List&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The last node points back to the &lt;strong&gt;first node&lt;/strong&gt;, forming a loop.
&lt;/li&gt;
&lt;li&gt;Can be singly or doubly linked.
&lt;/li&gt;
&lt;li&gt;Useful in scenarios where the list needs to &lt;strong&gt;wrap around&lt;/strong&gt; or be accessed in a cyclic manner.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Example: Simple Singly Linked List in C
&lt;/h1&gt;

&lt;p&gt;Below is a simple C program demonstrating how to create and traverse a singly linked list.&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;
#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="c1"&gt;// Define a node structure&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&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;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Function to print the linked list&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;printList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="nb"&gt;NULL&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;"%d -&amp;gt; "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&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;"NULL&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="p"&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="c1"&gt;// Allocate 3 nodes in the heap&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;head&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;third&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;head&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;malloc&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="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;malloc&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="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="n"&gt;third&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;malloc&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="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

    &lt;span class="c1"&gt;// Assign data and connect nodes&lt;/span&gt;
    &lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;data&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;head&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;second&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;data&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="n"&gt;second&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;third&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;third&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;third&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Print the linked list&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;"Linked List: "&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&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;h2&gt;
  
  
  Output :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Linked List: 10 -&amp;gt; 20 -&amp;gt; 30 -&amp;gt; NULL

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advantages and Disadvantages of Linked Lists
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Advantages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Dynamic size – no need to know the number of elements in advance.
&lt;/li&gt;
&lt;li&gt;Efficient insertion and deletion (no shifting required).
&lt;/li&gt;
&lt;li&gt;Useful for implementing advanced data structures.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disadvantages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No random access (you must traverse from the head).
&lt;/li&gt;
&lt;li&gt;Extra memory is needed for storing pointers.
&lt;/li&gt;
&lt;li&gt;Traversal and searching take more time compared to arrays.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Are Linked Lists Important?
&lt;/h2&gt;

&lt;p&gt;Linked lists are widely used in scenarios where dynamic memory allocation and frequent insertion or deletion are required.&lt;br&gt;&lt;br&gt;
They form the foundation for many advanced data structures such as &lt;strong&gt;stacks&lt;/strong&gt;, &lt;strong&gt;queues&lt;/strong&gt;, &lt;strong&gt;hash tables&lt;/strong&gt;, and &lt;strong&gt;graphs&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;They are also useful in implementing &lt;strong&gt;memory management systems&lt;/strong&gt;, &lt;strong&gt;file systems&lt;/strong&gt;, and &lt;strong&gt;real-time applications&lt;/strong&gt; where data keeps changing dynamically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Applications of Linked Lists
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Implementing &lt;strong&gt;stacks and queues&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Managing &lt;strong&gt;memory blocks&lt;/strong&gt; in operating systems&lt;/li&gt;
&lt;li&gt;Representing &lt;strong&gt;polynomials&lt;/strong&gt; and &lt;strong&gt;sparse matrices&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Building &lt;strong&gt;adjacency lists&lt;/strong&gt; for graph representation&lt;/li&gt;
&lt;li&gt;Implementing &lt;strong&gt;undo/redo functionality&lt;/strong&gt; in text editors&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Linked lists are one of the most fundamental data structures in computer science.&lt;br&gt;&lt;br&gt;
They provide flexibility in handling data that changes frequently and form the basis for many complex structures and algorithms.  &lt;/p&gt;

&lt;p&gt;Understanding how linked lists work is a great step toward mastering &lt;strong&gt;data structures and algorithms&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Further Reading
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/data-structures/linked-list/" rel="noopener noreferrer"&gt;GeeksforGeeks: Linked List Data Structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://visualgo.net/en/list" rel="noopener noreferrer"&gt;Visualgo: Linked List Visualization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>dsa</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>"Mastering Pointers in C: A Beginner's Guide"</title>
      <dc:creator>Sandeep</dc:creator>
      <pubDate>Sat, 15 Mar 2025 18:27:57 +0000</pubDate>
      <link>https://dev.to/sandeep_a67a84444cb5f3f6f/mastering-pointers-in-c-a-beginners-guide-25on</link>
      <guid>https://dev.to/sandeep_a67a84444cb5f3f6f/mastering-pointers-in-c-a-beginners-guide-25on</guid>
      <description>&lt;p&gt;If you're diving into C programming, you've probably heard of pointers. They are one of the most powerful and, at times, confusing aspects of the language. This guide will help you understand pointers from the ground up!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Pointers? 🧐&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A pointer is a variable that stores the memory address of another variable. Instead of holding a direct value, it holds the location where the value is stored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Declaring a Pointer&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int a = 10;
int *p = &amp;amp;a; // 'p' stores the address of 'a'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;a is an integer variable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;p is a pointer to an integer (int *p).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&amp;amp;a gives the memory address of a.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Dereferencing a Pointer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To access the value stored at a memory location, we use the dereference operator (*):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;printf("Value of a: %d\n", *p); // Prints 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why Use Pointers? 🤔&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pointers allow:&lt;br&gt;
✅ Dynamic memory allocation (e.g., malloc, calloc)&lt;br&gt;
✅ Efficient array and string handling&lt;br&gt;
✅ Passing large data structures efficiently&lt;br&gt;
✅ Direct memory manipulation (low-level programming)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pointer Arithmetic 🧮&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pointers can be incremented and decremented. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int arr[] = {1, 2, 3, 4};
int *ptr = arr;

printf("First element: %d\n", *ptr);   // 1
ptr++;
printf("Second element: %d\n", *ptr);  // 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each time we increment ptr, it moves to the next memory address based on the size of the data type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pointers and Arrays 🔗&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An array name acts like a pointer to its first element&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int arr[3] = {10, 20, 30};
int *ptr = arr;  // Same as int *ptr = &amp;amp;arr[0];
printf("First element: %d\n", *ptr);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dynamic Memory Allocation 🏗️&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using malloc() to allocate memory at runtime:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int *p = (int*)malloc(sizeof(int));
*p = 42;
printf("Dynamically allocated value: %d\n", *p);
free(p); // Always free memory!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Common Pointer Mistakes 🚨&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;❌ Dereferencing an uninitialized pointer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int *p;
printf("%d", *p); // Undefined behavior!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Always initialize pointers before using them.&lt;/p&gt;

&lt;p&gt;❌ Memory leaks&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int *p = (int*)malloc(10 * sizeof(int));
// No 'free(p)' → memory leak!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Always free() dynamically allocated memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts 💡
&lt;/h2&gt;

&lt;p&gt;Pointers are an essential concept in C that provide power and flexibility. Mastering them will make you a better C programmer! Keep practicing, and don’t hesitate to experiment with pointer-based code. 🚀&lt;/p&gt;

&lt;p&gt;Got any questions or insights? Drop a comment below! Happy coding! 💻✨&lt;/p&gt;

</description>
      <category>c</category>
      <category>programming</category>
      <category>pointers</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How do you print in c language?</title>
      <dc:creator>Sandeep</dc:creator>
      <pubDate>Sun, 08 Dec 2024 16:53:29 +0000</pubDate>
      <link>https://dev.to/sandeep_a67a84444cb5f3f6f/how-do-you-print-in-c-language-190l</link>
      <guid>https://dev.to/sandeep_a67a84444cb5f3f6f/how-do-you-print-in-c-language-190l</guid>
      <description>&lt;p&gt;&lt;strong&gt;I C programming language to print you have to first import a library named stdio which refers to standard input output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is how it works:-&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;stdio.h&amp;gt;
int main(){
   printf("I am new to C programming");
return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's That easy :)&lt;/p&gt;

</description>
      <category>c</category>
    </item>
    <item>
      <title>How to install jupyter notebook</title>
      <dc:creator>Sandeep</dc:creator>
      <pubDate>Sat, 16 Nov 2024 15:25:57 +0000</pubDate>
      <link>https://dev.to/sandeep_a67a84444cb5f3f6f/how-to-install-jupyter-notebook-1l9a</link>
      <guid>https://dev.to/sandeep_a67a84444cb5f3f6f/how-to-install-jupyter-notebook-1l9a</guid>
      <description>&lt;h2&gt;
  
  
  step1
&lt;/h2&gt;

&lt;p&gt;check if python is installed or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;on command prompt
type the following command :
python --version

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if python not downloaded download it from its website&lt;/p&gt;

&lt;h2&gt;
  
  
  step2
&lt;/h2&gt;

&lt;p&gt;check if pip is installed or not&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;on cmd
type the following command
pip --version


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  step3
&lt;/h2&gt;

&lt;p&gt;install jupyter notebook&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type the following command on the commmand prompt :
pip install notebook

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  step4
&lt;/h2&gt;

&lt;p&gt;after successful installation&lt;br&gt;
to open jupyter notebook&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type the following command on the command prompt :
jupyter notebook

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Done
&lt;/h2&gt;

</description>
      <category>jupyter</category>
      <category>python</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Technical writing road map</title>
      <dc:creator>Sandeep</dc:creator>
      <pubDate>Tue, 05 Nov 2024 15:56:01 +0000</pubDate>
      <link>https://dev.to/sandeep_a67a84444cb5f3f6f/technical-writing-road-map-19ml</link>
      <guid>https://dev.to/sandeep_a67a84444cb5f3f6f/technical-writing-road-map-19ml</guid>
      <description>&lt;h2&gt;
  
  
  Definition:
&lt;/h2&gt;

&lt;p&gt;Technical writing refers to documenting either simple or complex technical concepts in a sequential manner.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importance:
&lt;/h2&gt;

&lt;p&gt;Technical writing helps in :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Simplifying complex concepts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sequential order of information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Documentation of data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Overall help others understand a new technical concept.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Examples:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Installation guides for products like cooler , refrigerator , ps5 etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;App installation guides .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Case studies .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Company documents .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What I'm doing right now is also technical writing.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Types of technical writing.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Article/Blog Writing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Focused on delivering information on technical topics in an engaging and accessible way, article and blog writing helps readers stay informed, offering insights, tutorials, or industry updates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Manuals and Guides&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Offers step-by-step instructions to help users operate products or software efficiently&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API Documentation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Guides developers in integrating and using APIs, with reference materials and code examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Popular Websites for starting Technical writing:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Medium.com&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dev.to&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Docs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Upwork.com&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Steps/Tips for Technical Writing :
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;First in technical writing comes the heading
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tip*
Always keep the heading in capital letters and it should have a appropriate title. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You can now insert an image regarding the topic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now comes the subheadings&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tip*
The subheadings should always follow a sequential order.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;At last give the conclusion.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Main tip:&lt;/p&gt;

&lt;p&gt;Always try to communicate using simple and professional language format and avoid usage of AI like chatgpt , copilot etc.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Jobs of technical writers :
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Content developers.&lt;/li&gt;
&lt;li&gt;Content writers.&lt;/li&gt;
&lt;li&gt;Documentation specialists.&lt;/li&gt;
&lt;li&gt;Information designers.&lt;/li&gt;
&lt;li&gt;Information developers.&lt;/li&gt;
&lt;li&gt;Manual writers.&lt;/li&gt;
&lt;li&gt;Policy writers.&lt;/li&gt;
&lt;li&gt;Technical communications specialists.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Salary :
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Remember the data given here may vary from time to time&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In India the salary of a beginner technical writer varies from 5 LPA to 12 LPA.&lt;/li&gt;
&lt;li&gt;Here are a few examples of average technical writer salaries in other countries:&lt;/li&gt;
&lt;li&gt;United Kingdom: £30,000 - £50,000 per year&lt;/li&gt;
&lt;li&gt;Canada: $55,000 - $80,000 per year&lt;/li&gt;
&lt;li&gt;Australia: $60,000 - $90,000 per year&lt;/li&gt;
&lt;li&gt;Singapore: $50,000 - $75,000 per year&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who should choose Technical Writing as a Career ?
&lt;/h2&gt;

&lt;p&gt;If you love to teach and have a passion for describing things to other in detail you must give technical writing a try.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Thereby I conclude this article about Technical Writing with my best regards for the future Technical Writers and do comment to let me know whether it was worth it or not ;)&lt;/code&gt;  &lt;/p&gt;

&lt;blockquote&gt;
&lt;/blockquote&gt;

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