{"id":17124,"date":"2022-01-07T16:12:00","date_gmt":"2022-01-07T10:42:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/"},"modified":"2024-09-25T17:17:29","modified_gmt":"2024-09-25T11:47:29","slug":"data-structures-using-c","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/","title":{"rendered":"What are the Data Structure in C and How it works?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"what-is-c-programming-language\"><strong>What is C Programming Language?<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Designed by Dennis Ritchie<\/li>\n\n\n\n<li>First appearance- 1972<\/li>\n\n\n\n<li>Uses extension .c or .h<\/li>\n\n\n\n<li>Developed to make assembly language work much easier<\/li>\n\n\n\n<li>Procedural Language<\/li>\n\n\n\n<li>Much faster<\/li>\n\n\n\n<li>Handles low-level activity much better<\/li>\n\n\n\n<li>UNIX&nbsp;OS and RDBMS MYSQL is written in C<\/li>\n<\/ul>\n\n\n\n<p>You can also take up the <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/data-structures-in-c\" target=\"_blank\" rel=\"noreferrer noopener\">Free Data Structures for C Course<\/a> on Great Learning Academy and upskill. Learn more about the Implementation of Data Structures using C programming language, Arrays, Linked Lists, Binary Tree, and so much more. For more advanced skills, consider enrolling in our Pro course to<a href=\"#\"> <\/a>Learn C Programming from<a href=\"#\"> <\/a>Scratch to further deepen your C programming knowledge.<\/p>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Academy PRO<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/learn-c-programming-from-scratch\" class=\"courses-cta-title-link\">C Programming Course: Master C with Hands-on Projects<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Join our C Programming Course and learn C syntax, operators, expressions, control flow, functions, pointers, structures, file handling, memory management, and modular programming. Build real-world skills through practical projects!<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>2 Projects<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>10 Hrs<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/learn-c-programming-from-scratch\" class=\"courses-cta-button\">\n                C Programming Course with Certificate\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-data-structures-using-c\"><strong>What are Data Structures using C?<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Data Structures and Algorithms in C | C Programming Full course | Great Learning\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/MtVZAXepMPM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Made up of 2 words\n<ul class=\"wp-block-list\">\n<li>\u201cDATA\u201d + \u201cSTRUCTURES\u201d<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>It is a way to arrange data in computers<\/li>\n\n\n\n<li>Example: You might want to store data in\n<ul class=\"wp-block-list\">\n<li>Linear fashion - Array\/ Linked List<\/li>\n\n\n\n<li>One on the other - Stacks<\/li>\n\n\n\n<li>Hierarchical Fashion - Trees<\/li>\n\n\n\n<li>Connect nodes - Graph<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"list-of-data-structures-using-c\"><strong>List of Data Structures<\/strong> <strong>using C<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Array<\/li>\n\n\n\n<li>Linked List<\/li>\n\n\n\n<li>Stack&nbsp;<\/li>\n\n\n\n<li>Queue<\/li>\n\n\n\n<li>Binary Tree<\/li>\n\n\n\n<li>Binary Search Tree<\/li>\n\n\n\n<li>Heap<\/li>\n\n\n\n<li>Hashing&nbsp;<\/li>\n\n\n\n<li>Graph<\/li>\n<\/ul>\n\n\n\n<p>Also Read: <a aria-label=\"How to choose the right programming language for Data Science? (opens in a new tab)\" href=\"https:\/\/www.mygreatlearning.com\/blog\/what-are-the-best-programming-languages-to-learn\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to choose the right programming language for Data Science?<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"array\"><strong>Array<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linear Data Structures using C<\/li>\n\n\n\n<li>Elements are stored in contiguous memory locations<\/li>\n\n\n\n<li>Can access elements randomly using index<\/li>\n\n\n\n<li>Stores homogeneous elements i.e, similar elements<\/li>\n\n\n\n<li>Syntax:<\/li>\n\n\n\n<li>Array declaration\n<ul class=\"wp-block-list\">\n<li>Datatype varname [size]&nbsp; ;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Can also do declaration and initialization at once\n<ul class=\"wp-block-list\">\n<li>Datatype varname [] = {ele1, ele2, ele3, ele4};<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Random access<\/li>\n\n\n\n<li>Easy sorting and iteration<\/li>\n\n\n\n<li>Replacement of multiple variables<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages\"><strong>Disadvantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Size is fixed<\/li>\n\n\n\n<li>Difficult to insert and delete<\/li>\n\n\n\n<li>If capacity is more and occupancy less, most of the array gets wasted&nbsp;<\/li>\n\n\n\n<li>Needs contiguous memory to get allocated<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications\"><strong>Applications<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For storing information in a linear fashion<\/li>\n\n\n\n<li>Suitable for applications that require frequent searching<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"array-examples\"><strong> Array<\/strong> <strong>Examples<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt;\nint main() {\n\t\/\/array declaration\n\tint rollNo&#091;10];\n\t\n\t\/\/taking inputs\n\tfor(int i=0;i&lt;10;i++)\n\t    scanf(\"%d\",&amp;rollNo&#091;i]);\n\t\n\t\/\/printing\n\tfor(int i=0;i&lt;10;i++)\n\t    printf(\"%d \",rollNo&#091;i]);\n\treturn 0;\n}\n\nInput:\n12 13 34 56 12 87 56 78 23 10\n\nOutput:\n12 13 34 56 12 87 56 78 23 10\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt;\n\nint main() \n{\n  int marks&#091;20], i, n, sum = 0, avg;\n\n  printf(\"Enter the number of elements: \");\n  scanf(\"%d\", &amp;n);\n\n  for(i=0; i &lt; n; ++i) \n{\n    printf(\"Enter number%d: \",i+1);\n    scanf(\"%d\", &amp;marks&#091;i]);\n    sum += marks&#091;i];\n  }\n\n  avg = sum \/ n;\n  printf(\"Avg = %d\", avg);\n  return 0;\n\n}\n<\/code><\/pre>\n\n\n\n<p>Input and Output:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/S31_paBFVxc3-CDMXI76XnvRLicu1vRtQ1J-7ojW-iFAaj06mvxU92Yr_3kGOA6XdS75-YyrRI1ME1efyXl9Tp_vQ0e_3ssNa7RZlIeMRIxM3lD_IkeiHZq6xZ2z7iRR8jmVSrib\" alt=\"\"\/><\/figure>\n\n\n\n<h2 id=\"linked-list\"><strong>Linked List<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linear Data Structure<\/li>\n\n\n\n<li>Elements can be stored as per memory availability<\/li>\n\n\n\n<li>Can access elements on linear fashion only<\/li>\n\n\n\n<li>Stores homogeneous elements i.e, similar elements<\/li>\n\n\n\n<li>Dynamic in size<\/li>\n\n\n\n<li>Easy insertion and deletion&nbsp;<\/li>\n\n\n\n<li>Starting element or node is the key which is generally termed as the head.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages-of-data-structure-using-c\"><strong>Advantages<\/strong> <strong>of Data Structure using C<\/strong> <\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Dynamic in size<\/li>\n\n\n\n<li>No wastage as capacity and size is always equal<\/li>\n\n\n\n<li>Easy insertion and deletion as 1 link manipulation is required<\/li>\n\n\n\n<li>Efficient memory allocation<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages-of-data-structure-using-c\"><strong>Disadvantages of Data Structure using C<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the head node is lost, the linked list is lost<\/li>\n\n\n\n<li>No random access possible<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications-of-data-structure-using-c\"><strong>Applications<\/strong> <strong>of Data Structure using C<\/strong> <\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Suitable where memory is limited&nbsp;<\/li>\n\n\n\n<li>Suitable for applications that require frequent insertion and deletion<\/li>\n<\/ul>\n\n\n\n<p>Also Read: <a href=\"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-linear-programming-for-data-science\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Introduction to Linear Programming  (opens in a new tab)\">Introduction to Linear Programming <\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"examples-linked-list\"><strong>Examples <a href=\"https:\/\/www.mygreatlearning.com\/blog\/linked-list-interview-questions\/\" target=\"_blank\" rel=\"noreferrer noopener\">Linked List<\/a><\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;stdio.h&gt;\n#include&lt;conio.h&gt;\n#include&lt;stdlib.h&gt;\nstruct node\n{int data;\n struct node *next;\n}*p,*tmp,*tmp1;\nvoid insert_end(int);\nvoid insert_beg(int);\nvoid ldelete(int);\nvoid display();\nvoid main()\n{ \n  int val,n;\n  p=NULL;\n  do\n\t{printf(\"n************************* MENU ************************\");\n\t printf(\"n1.INSERT AT END\");\n\t printf(\"n2.INSERT AT BEG\");\n\t printf(\"n3.DELETE A PARTICULAR ELE\");\n\t printf(\"n4.DELETE FROM BEG\");\n\t printf(\"n5.DELETE FROM END\");\n\t printf(\"n6.DISPLAY\");\n\t printf(\"n7.EXIT\");\n\t printf(\"nenter ur choice : \");\n\t scanf(\"%d\",&amp;n);\n\t switch(n)\n\t\t{case 1: printf(\"nenter the value \");\n\t\t\t scanf(\"%d\",&amp;val);\n\t\t\t insert_end(val);\n\t\t\t break;\n\t\t case 2: printf(\"nenter the value\");\n\t\t\t scanf(\"%d\",&amp;val);\n\t\t\t insert_beg(val);\n\t\t\t break;\n\t\t case 3: printf(\"nenter the value\");\n\t\t\t scanf(\"%d\",&amp;val);\n\t\t\t l_delete(val);\n\t\t\t break;\n\t\t case 4: \n\t\t\t delete_beg();\n\t\t\t break;\n\t\t case 5: \n\t\t\t delete_end();\n\t\t\t break;\n\t\t case 6: display();\n\t\t \t\t break;\n\t\t case 7: exit(0);\n\t\t \t\t break;\n\t\t default: printf(\"n Wrong Choice!\");\n\t\t \t\t  break;\n\t\t}\n\t printf(\"n do u want to cont... \");\n\t}while('y'==getch());\n\n }\n\n void insert_end(int ele)\n {\n\t  tmp=p;\n\t  tmp1=(struct node*)malloc(sizeof(struct node));\n\t  tmp1-&gt;data=ele;\n\t  tmp1-&gt;next=NULL;\n\t  if(p==NULL)\n\t\tp=tmp1;\n\t  else\n\t\t{\n\t\t\twhile(tmp-&gt;next!=NULL)\n\t\t\t\ttmp=tmp-&gt;next;\n\t\t \ttmp-&gt;next=tmp1;\n\t\t }\n }\n\nvoid insert_beg(int ele)\n{\n\t tmp=p;\n\t tmp1=(struct node*)malloc(sizeof(struct node));\n\t tmp1-&gt;data=ele;\n\t tmp1-&gt;next=p;\n\t p=tmp1;\n}\n\nvoid l_delete(int ele)\n{\n     tmp=p;\n\t struct node *pre=tmp;\n\t while(tmp!=NULL)\n\t\t{if(tmp-&gt;data==ele)\n\t\t    { if(tmp==p)\n\t\t       {p=tmp-&gt;next;\n\t\t\tfree(tmp);\n\t\t\treturn;\n\t\t\t}\n\t\t      else\n\t\t\t{pre-&gt;next=tmp-&gt;next;\n\t\t\t free(tmp);\n\t\t\t return;\n\t\t\t }\n\t\t    }\n\t\t else\n\t\t    { pre=tmp;\n\t\t      tmp=tmp-&gt;next;\n\t\t    }\n\t\t}\n\t  printf(\"n no match found!! \");\n }\n \nvoid delete_beg()\n{\t\n\ttmp=p;\n\tif(p==NULL)\n\t\tprintf(\"n no element to be deleted!! \");\n\telse\n\t{\n\t\tprintf(\"nelement deleted - %d\", p-&gt;data);\n\t\tp=p-&gt;next;\n\t}\n\n }\n \nvoid delete_end()\n{\t\n\ttmp=p;\n\tstruct node* pre;\n\tif(p==NULL)\n\t\tprintf(\"n no element to be deleted!! \");\n\telse if(p-&gt;next==NULL)\n\t{\n\t\tprintf(\"nelement deleted - %d\", p-&gt;data);\n\t\tp=NULL;\n\n\t}\n\t\t\n\telse\n\t{\n\t\twhile(tmp-&gt;next!=NULL){\n\t\t\tpre=tmp;\n\t\t\ttmp=tmp-&gt;next;\n\t\t}\n\t\tpre-&gt;next=NULL;\n\t\tprintf(\"nelement deleted - %d\", tmp-&gt;data);\n\t\t\n\t}\n\n }\n\nvoid display()\n{\n\ttmp=p;\n \twhile(tmp!=NULL)\n\t\t{printf(\"n %d\",tmp-&gt;data);\n\t \ttmp=tmp-&gt;next;\n\t\t}\n}\n\n\nOutput:\n\n\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter your choice : 1\n\nenter the value 23\n\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice :\n1\n\nenter the value 12\n\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice :\n2\n\nenter the value67\n\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice :\n2\n\nenter the value90\n\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice :\n6\n\n 90\n 67\n 23\n 12\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice : 3\n\nenter the value67\n\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice :\n6\n\n 90\n 23\n 12\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice :\n4\n\nelement deleted - 90\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice : 5\n\nelement deleted - 12\ndo u want to cont...\n************************* MENU ************************\n1.INSERT AT END\n2.INSERT AT BEG\n3.DELETE A PARTICULAR ELE\n4.DELETE FROM BEG\n5.DELETE FROM END\n6.DISPLAY\n7.EXIT\nenter ur choice : 6\n\n 23\ndo u want to cont...\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n\nstruct node \n{\n    int num;                   \n    struct node *nextptr;       \n}*stnode;\n\nvoid createNodeList(int n);    \nvoid reverseDispList();         \nvoid displayList();            \nint main()\n{\n    int n;\n    printf(\"nn Linked List : Create a singly linked list and print it in reverse order :n\");\n    printf(\" Input the number of nodes : \");\n    scanf(\"%d\", &amp;n);\n    createNodeList(n);\n    printf(\"n Data entered in the list are : n\");\t\t\n    displayList();\n    reverseDispList();\n    printf(\"n The list in reverse are :  n\");\n    displayList();\n    return 0;\n}\n\nvoid createNodeList(int n)\n{\n    struct node *fnNode, *tmp;\n    int num, i;\n    stnode = (struct node *)malloc(sizeof(struct node));\n    if(stnode == NULL) \n    {\n        printf(\" Memory can\u2019t  be allocated.\");\n    }\n    else\n    {\n        printf(\" Input data for node 1 : \");\n        scanf(\"%d\", &amp;num);\n        stnode-&gt; num = num;      \n        stnode-&gt; nextptr = NULL;\n        tmp = stnode;\n        for(i=2; i&lt;=n; i++)\n        {\n            fnNode = (struct node *)malloc(sizeof(struct node));\n            if(fnNode == NULL) \n            {\n                printf(\" Memory can not be allocated.\");\n                break;\n            }\n            else\n            {\n                printf(\" Input data for node %d : \", i);\n                scanf(\" %d\", &amp;num);\n                fnNode-&gt;num = num;     \n                fnNode-&gt;nextptr = NULL; \n                tmp-&gt;nextptr = fnNode; \n                tmp = tmp-&gt;nextptr;\n            }\n        }\n    }\n}\n\nvoid reverseDispList()\n{\n    struct node *prevNode, *curNode;\n \n    if(stnode != NULL)\n    {\n        prevNode = stnode;\n        curNode = stnode-&gt;nextptr;\n        stnode = stnode-&gt;nextptr;\n \n        prevNode-&gt;nextptr = NULL;  \n        while(stnode != NULL)\n        {\n            stnode = stnode-&gt;nextptr;\n            curNode-&gt;nextptr = prevNode;\n \n            prevNode = curNode;\n            curNode = stnode;\n        }\n        stnode = prevNode; \n    }\n}\n\nvoid displayList()\n{\n    struct node *tmp;\n    if(stnode == NULL)\n    {\n        printf(\" No data found in the list.\");\n    }\n    else\n    {\n        tmp = stnode;\n        while(tmp != NULL)\n        {\n            printf(\" Data = %dn\", tmp-&gt;num);   \n            tmp = tmp-&gt;nextptr;                 \n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/-6yyXYejrg6AMID8LFJ3zUwAe5noYQiJo4HdvHTr56R-R_n18zqGfadWov6B_yYW8y-m-koU6skSaED6YPdCsd-t1yO3vR83vjD1wekXfywrWy8_Bp63GnI_PJi6b8bl6E-pAnFj\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"stack\"><strong>Stack<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It is a type of Linear Data Structures using C<\/li>\n\n\n\n<li>Follows LIFO: Last In First Out<\/li>\n\n\n\n<li>Only the top elements are available to be accessed<\/li>\n\n\n\n<li>Insertion and deletion takes place from the top<\/li>\n\n\n\n<li>Eg: a stack of plates, chairs, etc<\/li>\n\n\n\n<li>4 major operations:\n<ul class=\"wp-block-list\">\n<li>push(ele) - used to insert element at top<\/li>\n\n\n\n<li>pop() - removes the top element from stack<\/li>\n\n\n\n<li>isEmpty() - returns true is stack is empty<\/li>\n\n\n\n<li>peek() - to get the top element of the stack<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>All operation works in constant time i.e, O(1)<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Maintains data in a LIFO manner<\/li>\n\n\n\n<li>The last element is readily available for use<\/li>\n\n\n\n<li>All operations are of O(1) complexity<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages\"><strong>Disadvantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Manipulation is restricted to the top of the stack<\/li>\n\n\n\n<li>Not much flexible<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications\"><strong>Applications<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Recursion<\/li>\n\n\n\n<li>Parsing<\/li>\n\n\n\n<li>Browser<\/li>\n\n\n\n<li>Editors<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"demonstration-of-stack-using-array\"><strong>Demonstration of Stack - using <a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-an-array-learn-more-in-one-read\/\" target=\"_blank\" rel=\"noreferrer noopener\">Array<\/a><\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt; \n#include &lt;stdlib.h&gt; \n#include &lt;limits.h&gt; \n\nstruct stackk { \n\tint top; \n\tunsigned size; \n\tint* array; \n}; \n\n\n\n    \nstruct stackk* create(unsigned size) \n{ \n\tstruct stackk* stackk = (struct stackk*)malloc(sizeof(struct stackk)); \n\tstackk-&gt;size = size; \n\tstackk-&gt;top = -1; \n\tstackk-&gt;array = (int*)malloc(stackk-&gt;size * sizeof(int)); \n\treturn stackk; \n} \n\nint isFull(struct stackk* stackk) \n{ \n\treturn stackk-&gt;top == stackk-&gt;size - 1; \n} \n\nint isEmpty(struct stackk* stackk) \n{ \n\treturn stackk-&gt;top == -1; \n} \n\nvoid push(struct stackk* stackk, int item) \n{ \n\tif (isFull(stackk)) \n\t\treturn; \n\tstackk-&gt;array&#091;++stackk-&gt;top] = item; \n} \n\n\nint pop(struct stackk* stackk) \n{ \n\tif (isEmpty(stackk)) \n\t\treturn -1; \n\treturn stackk-&gt;array&#091;stackk-&gt;top--]; \n} \n\nint peek(struct stackk* stackk) \n{ \n\tif (isEmpty(stackk)) \n\t\treturn INT_MIN; \n\treturn stackk-&gt;array&#091;stackk-&gt;top]; \n} \n\n\nint main()\n{ \n  int val,n;\n  struct stackk* stackk = create(100); \n  do\n\t{printf(\"n************************* MENU ************************\");\n\t printf(\"n1.PUSH\");\n\t printf(\"n2.POP\");\n\t printf(\"n3.PEEK\");\n\t printf(\"n4 IS EMPTY\");\n\t printf(\"n5.EXIT\");\n\t printf(\"n enter ur choice : \");\n\t scanf(\"%d\",&amp;n);\n\t switch(n)\n\t\t{\n\t\t case 1: \n\t\t     printf(\"nenter the value \");\n\t\t\t scanf(\"%d\",&amp;val);\n\t\t\t push(stackk , val);\n\t\t\t break;\n\t\t case 2: \n\t\t\t printf(\"n popped element : %d\",pop(stackk));\n\t\t\t break;\n\t\t \n\t\tcase 3: \n\t\t\tprintf(\"n top element : %d\",peek(stackk));\n\t\t\t break;\n\t\t case 4: printf(\"n is empty : %d\",isEmpty(stackk));\n\t\t \t\t break;\n\t\t case 5: exit(0);\n\t\t \t\t break;\n\t\t default: printf(\"n Wrong Choice!\");\n\t\t \t\t  break;\n\t\t}\n\t printf(\"n do u want to cont... \");\n\t}while('y'==getch());\n\n }\n\n\n\n\nOutput:\n\n************************* MENU ************************\n1.PUSH\n2.POP\n3.PEEK\n4 IS EMPTY\n5.EXIT\nenter ur choice :\n1\n\nenter the value\n45\n\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3.PEEK\n4 IS EMPTY\n5.EXIT\nenter ur choice :\n1\n\nenter the value\n56\n\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3.PEEK\n4 IS EMPTY\n5.EXIT\nenter ur choice :\n3\n\n top element : 56\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3.PEEK\n4 IS EMPTY\n5.EXIT\nenter ur choice :\n4\n\n is empty : 0\ndo u want to cont...\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"demonstration-of-stack-using-linkedlist\"><strong>Demonstration of Stack - using LinkedList<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;stdio.h&gt;\n#include&lt;conio.h&gt;\n#include&lt;stdlib.h&gt;\nstruct node\n{int data;\n struct node *next;\n}*p,*tmp,*tmp1,*end;\nvoid insert_end(int);\nvoid display();\nvoid delete_end();\nvoid isEmpty();\nint main()\n{ \n  int val,n;\n  p=NULL;\n  do\n\t{printf(\"n************************* MENU ************************\");\n\t printf(\"n1.PUSH\");\n\t printf(\"n2.POP\");\n\t printf(\"n3 IS EMPTY\");\n\t printf(\"n4.DISPLAY\");\n\t printf(\"n5.EXIT\");\n\t printf(\"nenter ur choice : \");\n\t scanf(\"%d\",&amp;n);\n\t switch(n)\n\t\t{\n\t\t case 1: \n\t\t     printf(\"nenter the value \");\n\t\t\t scanf(\"%d\",&amp;val);\n\t\t\t insert_end(val);\n\t\t\t break;\n\t\t case 2: \n\t\t\t delete_end();\n\t\t\t break;\n\t\t \n\t\tcase 3: \n\t\t\t isEmpty();\n\t\t\t break;\n\t\t case 4: display();\n\t\t \t\t break;\n\t\t case 5: exit(0);\n\t\t \t\t break;\n\t\t default: printf(\"n Wrong Choice!\");\n\t\t \t\t  break;\n\t\t}\n\t printf(\"ndo u want to cont... \");\n\t}while('y'==getch());\n\n }\n\n void insert_end(int ele)\n {\n\t  tmp=p;\n\t  tmp1=(struct node*)malloc(sizeof(struct node));\n\t  tmp1-&gt;data=ele;\n\t  tmp1-&gt;next=NULL;\n\t  if(p==NULL)\n\t\tp=tmp1;\n\t  else\n\t\t{\n\t\t\twhile(tmp-&gt;next!=NULL)\n\t\t\t\ttmp=tmp-&gt;next;\n\t\t \ttmp-&gt;next=tmp1;\n\t\t }\n\t  end=tmp1;\n }\n\n\nvoid delete_end()\n{\t\n\ttmp=p;\n\tstruct node* pre;\n\tif(p==NULL)\n\t\tprintf(\"n no element to be deleted!! \");\n\telse if(p-&gt;next==NULL)\n\t{\n\t\tprintf(\"nelement deleted - %d\", p-&gt;data);\n\t\tp=NULL;\n\t\tend=NULL;\n\n\t}\n\t\t\n\telse\n\t{\n\t\twhile(tmp-&gt;next!=NULL){\n\t\t\tpre=tmp;\n\t\t\ttmp=tmp-&gt;next;\n\t\t}\n\t\tpre-&gt;next=NULL;\n\t\tend=pre;\n\t\tprintf(\"nelement deleted - %d\", tmp-&gt;data);\n\t\t\n\t}\n\n }\n \n\n\nvoid isEmpty(){\n\t\n \tif(p==NULL)\n \t\tprintf(\"Stack is Empty\");\n \telse\n \t{\n \t\tprintf(\"Stack is Not Empty\");\n\t }\t\n}\nvoid display()\n{\n\ttmp=p;\n \twhile(tmp!=NULL)\n\t\t{printf(\"n %d\",tmp-&gt;data);\n\t \ttmp=tmp-&gt;next;\n\t\t}\n}\n\n\n\nOutput\n \n************************* MENU ************************\n1.PUSH\n2.POP\n3 IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 1\n\nenter the value 56\n\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3 IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice :\n1\n\nenter the value 67\n\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3 IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice :\n3\nStack is Not Empty\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3 IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice :\n4\n\n 56\n 67\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3 IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 2\n\nelement deleted - 67\ndo u want to cont...\n************************* MENU ************************\n1.PUSH\n2.POP\n3 IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 4\n\n 56\ndo u want to cont...\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"queue\"><strong>Queue<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linear Data Structures using C<\/li>\n\n\n\n<li>Follows FIFO: First In First Out<\/li>\n\n\n\n<li>Insertion can take place from the rear end.<\/li>\n\n\n\n<li>Deletion can take place from the front end.<\/li>\n\n\n\n<li>Eg: queue at ticket counters, bus station<\/li>\n\n\n\n<li>4 major operations:\n<ul class=\"wp-block-list\">\n<li>enqueue(ele) - used to insert element at top<\/li>\n\n\n\n<li>dequeue() - removes the top element from queue&nbsp;<\/li>\n\n\n\n<li>peekfirst() - to get the first element of the queue&nbsp;<\/li>\n\n\n\n<li>peeklast() - to get the last element of the queue&nbsp;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>All operation works in constant time i.e, O(1)<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Maintains data in FIFO manner<\/li>\n\n\n\n<li>Insertion from beginning and deletion from end takes O(1) time<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications\"><strong>Applications<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Scheduling<\/li>\n\n\n\n<li>Maintaining playlist<\/li>\n\n\n\n<li>Interrupt handling<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"demonstration-of-queue-using-array\"><strong>Demonstration of Queue- using Array<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt; \n#include &lt;stdlib.h&gt; \n#include &lt;limits.h&gt; \n\nstruct que \n{ \n    int front, rear, size; \n    unsigned actualSize; \n    int* arr; \n}; \n\n\nstruct que* createque(unsigned actualSize) \n{ \n    struct que* que = (struct que*) malloc(sizeof(struct que)); \n    que-&gt;actualSize = actualSize; \n    que-&gt;front = que-&gt;size = 0;  \n    que-&gt;rear = actualSize - 1;\n    que-&gt;arr = (int*) malloc(que-&gt;actualSize * sizeof(int)); \n    return que; \n} \n\nint isFull(struct que* que) \n{  return (que-&gt;size == que-&gt;actualSize);  } \n  \n\nvoid enqueue(struct que* que, int item) \n{ \n    if (isFull(que)) \n        return; \n    que-&gt;rear = (que-&gt;rear + 1)%que-&gt;actualSize; \n    que-&gt;arr&#091;que-&gt;rear] = item; \n    que-&gt;size = que-&gt;size + 1; \n    printf(\"%d enqueued to quen\", item); \n} \n\nint isEmpty(struct que* que) \n{  return (que-&gt;size == 0); } \n  \nint dequeue(struct que* que) \n{ \n    if (isEmpty(que)) \n        return INT_MIN; \n    int item = que-&gt;arr&#091;que-&gt;front]; \n    que-&gt;front = (que-&gt;front + 1)%que-&gt;actualSize; \n    que-&gt;size = que-&gt;size - 1; \n    return item; \n} \n\nint front(struct que* que) \n{ \n    if (isEmpty(que)) \n        return INT_MIN; \n    return que-&gt;arr&#091;que-&gt;front]; \n} \n\nint rear(struct que* que) \n{ \n    if (isEmpty(que)) \n        return INT_MIN; \n    return que-&gt;arr&#091;que-&gt;rear]; \n} \n\nint main()\n{ \n  int val,n;\n  struct que* que = createque(1000); \n\n  do\n\t{printf(\"n************************* MENU ************************\");\n\t printf(\"n1.ENQUEUE\");\n\t printf(\"n2.DEQUEUE\");\n\t printf(\"n3.IS EMPTY\");\n\t printf(\"n4.IS FULL\");\n\t printf(\"n5.FIRST ELE\");\n\t printf(\"n6.LAST ELE\");\n\t printf(\"n7.EXIT\");\n\t printf(\"nenter ur choice : \");\n\t scanf(\"%d\",&amp;n);\n\t switch(n)\n\t\t{case 1: printf(\"nenter the value \");\n\t\t\t scanf(\"%d\",&amp;val);\n\t\t\t enqueue(que,val);\n\t\t\t break;\n\t\t case 2:\n\t\t\t dequeue(que);\n\t\t\t break;\n\t\t case 3: \n\t\t\t printf(\"nIsEmpty : %d\",isEmpty(que));\n\t\t\t break;\n\t\t case 4: \n\t\t\t printf(\"nIsFull : %d\",isFull(que));\n\t\t \t break;\n\n\t\t case 5: \n\t\t\t printf(\"nFront element: %d\",front(que));\n\t\t\t  break;\t  \n\t\t case 6: \n\t\t\t printf(\"nLast element : %d\",  rear(que));\n\t\t\t  break;\n\t\tcase 7: exit(0);\n\t\t \t\t break;\n\t\t default: printf(\"n Wrong Choice!\");\n\t\t \t\t  break;\n\t\t}\n\t printf(\"ndo u want to cont... \");\n\t}while('y'==getch());\n\n }\n\n\n\nOutput:\n\n\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUEUE\n3.IS EMPTY\n4.IS FULL\n5.FIRST ELE\n6.LAST ELE\n7.EXIT\nenter ur choice : 1\n\nenter the value 23\n23 enqueued to que\n\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUEUE\n3.IS EMPTY\n4.IS FULL\n5.FIRST ELE\n6.LAST ELE\n7.EXIT\nenter ur choice :\n1\n\nenter the value 45\n45 enqueued to que\n\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUEUE\n3.IS EMPTY\n4.IS FULL\n5.FIRST ELE\n6.LAST ELE\n7.EXIT\nenter ur choice : 3\n\nIsEmpty : 0\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUEUE\n3.IS EMPTY\n4.IS FULL\n5.FIRST ELE\n6.LAST ELE\n7.EXIT\nenter ur choice :\n4\n\nIsFull : 0\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUEUE\n3.IS EMPTY\n4.IS FULL\n5.FIRST ELE\n6.LAST ELE\n7.EXIT\nenter ur choice : 5\n\nFront element: 23\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUEUE\n3.IS EMPTY\n4.IS FULL\n5.FIRST ELE\n6.LAST ELE\n7.EXIT\nenter ur choice : 6\n\nLast element : 45\ndo u want to cont...\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"demonstration-of-queue-using-linkedlist\"><strong>Demonstration of Queue- using LinkedList<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;stdio.h&gt;\n#include&lt;conio.h&gt;\n#include&lt;stdlib.h&gt;\nstruct node\n{int data;\n struct node *next;\n}*p,*tmp,*tmp1;\nvoid insert_end(int);\nvoid delete_beg();\nvoid display();\nvoid isEmpty();\nint main()\n{ \n  int val,n;\n  p=NULL;\n  do\n\t{printf(\"n************************* MENU ************************\");\n\t printf(\"n1.ENQUEUE\");\n\t printf(\"n2.DEQUE\");\n\t printf(\"n3.IS EMPTY\");\n\t printf(\"n4.DISPLAY\");\n\t printf(\"n5.EXIT\");\n\t printf(\"nenter ur choice : \");\n\t scanf(\"%d\",&amp;n);\n\t switch(n)\n\t\t{case 1: printf(\"nenter the value \");\n\t\t\t scanf(\"%d\",&amp;val);\n\t\t\t insert_end(val);\n\t\t\t break;\n\t\t case 2:\n\t\t\t delete_beg();\n\t\t\t break;\n\t\t case 3: \n\t\t\t isEmpty();\n\t\t\t break;\n\t\t case 4: display();\n\t\t \t\t break;\n\t\t case 5: exit(0);\n\t\t \t\t break;\n\t\t default: printf(\"n Wrong Choice!\");\n\t\t \t\t  break;\n\t\t}\n\t printf(\"ndo u want to cont... \");\n\t}while('y'==getch());\n\n }\n\n void insert_end(int ele)\n {\n\t  tmp=p;\n\t  tmp1=(struct node*)malloc(sizeof(struct node));\n\t  tmp1-&gt;data=ele;\n\t  tmp1-&gt;next=NULL;\n\t  if(p==NULL)\n\t\tp=tmp1;\n\t  else\n\t\t{\n\t\t\twhile(tmp-&gt;next!=NULL)\n\t\t\t\ttmp=tmp-&gt;next;\n\t\t \ttmp-&gt;next=tmp1;\n\t\t }\n }\n\nvoid insert_beg(int ele)\n{\n\t tmp=p;\n\t tmp1=(struct node*)malloc(sizeof(struct node));\n\t tmp1-&gt;data=ele;\n\t tmp1-&gt;next=p;\n\t p=tmp1;\n}\n\nvoid isEmpty(){\n\t\n \tif(p==NULL)\n \t\tprintf(\"Queue is Empty\");\n \telse\n \t{\n \t\tprintf(\"Queue is Not Empty\");\n\t }\t\n}\n\nvoid ldelete(int ele)\n{\n     tmp=p;\n\t struct node *pre=tmp;\n\t while(tmp!=NULL)\n\t\t{if(tmp-&gt;data==ele)\n\t\t    { if(tmp==p)\n\t\t       {p=tmp-&gt;next;\n\t\t\tfree(tmp);\n\t\t\treturn;\n\t\t\t}\n\t\t      else\n\t\t\t{pre-&gt;next=tmp-&gt;next;\n\t\t\t free(tmp);\n\t\t\t return;\n\t\t\t }\n\t\t    }\n\t\t else\n\t\t    { pre=tmp;\n\t\t      tmp=tmp-&gt;next;\n\t\t    }\n\t\t}\n\t  printf(\"n no match found!! \");\n }\n \nvoid delete_beg()\n{\t\n\ttmp=p;\n\tif(p==NULL)\n\t\tprintf(\"n no element to be deleted!! \");\n\telse\n\t{\n\t\tprintf(\"nelement deleted - %d\", p-&gt;data);\n\t\tp=p-&gt;next;\n\t}\n\n }\n \nvoid delete_end()\n{\t\n\ttmp=p;\n\tstruct node* pre;\n\tif(p==NULL)\n\t\tprintf(\"n no element to be deleted!! \");\n\telse if(p-&gt;next==NULL)\n\t{\n\t\tprintf(\"nelement deleted - %d\", p-&gt;data);\n\t\tp=NULL;\n\n\t}\n\t\t\n\telse\n\t{\n\t\twhile(tmp-&gt;next!=NULL){\n\t\t\tpre=tmp;\n\t\t\ttmp=tmp-&gt;next;\n\t\t}\n\t\tpre-&gt;next=NULL;\n\t\tprintf(\"nelement deleted - %d\", tmp-&gt;data);\n\t\t\n\t}\n\n }\n\nvoid display()\n{\n\ttmp=p;\n \twhile(tmp!=NULL)\n\t\t{printf(\"n %d\",tmp-&gt;data);\n\t \ttmp=tmp-&gt;next;\n\t\t}\n}\n\n\nOutput\n\t\t\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUE\n3.IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 1\n\nenter the value 45\n\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUE\n3.IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice :\n1\n\nenter the value 67\n\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUE\n3.IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 4\n\n 45\n 67\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUE\n3.IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 3\nQueue is Not Empty\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUE\n3.IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 2\n\nelement deleted - 45\ndo u want to cont...\n************************* MENU ************************\n1.ENQUEUE\n2.DEQUE\n3.IS EMPTY\n4.DISPLAY\n5.EXIT\nenter ur choice : 4\n\n 67\ndo u want to cont...\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"binary-tree\"><strong><a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/binary-trees\" target=\"_blank\" rel=\"noreferrer noopener\">Binary Tree<\/a><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hierarchical&nbsp; Data Structures using C<\/li>\n\n\n\n<li>Topmost element is known as the root of the tree<\/li>\n\n\n\n<li>Every node can have at most 2 children in the binary tree<\/li>\n\n\n\n<li>Can access elements randomly using index<\/li>\n\n\n\n<li>Eg: File system hierarchy<\/li>\n\n\n\n<li>Common traversal methods:\n<ul class=\"wp-block-list\">\n<li>preorder(root) : print-left-right<\/li>\n\n\n\n<li>postorder(root) : left-right-print&nbsp;<\/li>\n\n\n\n<li>inorder(root) : left-print-right<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Can represent data with some relationship<\/li>\n\n\n\n<li>Insertion and search are much efficient<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages\"><strong>Disadvantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sorting is difficult<\/li>\n\n\n\n<li>Not much flexible<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications\"><strong>Applications<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>File system hierarchy<\/li>\n\n\n\n<li>Multiple variations of the binary tree have a wide variety of applications<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"demonstration-of-binary-tree\"><strong>Demonstration of Binary Tree<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;stdio.h&gt;\n#include&lt;conio.h&gt;\n#include&lt;stdlib.h&gt;\n\nstruct bst\n {\n \tint data;\n \tstruct bst *left;\n \tstruct bst *right;\n };\n \n struct bst * insert(struct bst *,int);\n void inorder(struct bst *);\n void preorder(struct bst *);\n void postorder(struct bst *);\n \n int main ()\n  {\n  \tstruct bst *r=NULL;\n  \t  r=insert(r,30);\n  \t  r=insert(r,15);\n  \t  r=insert(r,10);\n  \t  r=insert(r,20);\n  \t  r=insert(r,40);\n  \t  r=insert(r,5);\n  \t  r=insert(r,45);\n  \t  r=insert(r,35);\n  \t  printf(\"n display element in inorder:-\");\n  \t  inorder(r);\n  \t  printf(\"n display element in preorder:-\");\n  \t  preorder(r);\n  \t  printf(\"n display element in postorder:-\");\n  \t  postorder(r);\n  \t return 1;\n  \t \n   } \n   \n   struct bst * insert(struct bst *q,int val)\n    {\n      struct bst *tmp;\n      tmp=(struct bst *)malloc(sizeof(struct bst));\n      \n    \tif(q==NULL)\n    \t { \n    \t \t tmp-&gt;data=val;\n    \t \t tmp-&gt;left=tmp-&gt;right=NULL;\n    \t \t return tmp;\n\t\t }\n\t\t else\n\t\t  {\n\t\t  \t if(val&lt;(tmp-&gt;data))\n\t\t  \t   {\n\t\t  \t   \t  q-&gt;left=insert(q-&gt;left,val);\n\t\t\t   }\n\t\t  \t else\n\t\t  \t  {\n\t\t  \t  \t q-&gt;right=insert(q-&gt;right,val);\n\t\t      }\n\t\t  }\n\t\t return q; \n\t}\n\t\n\t\n\t void inorder(struct bst *q)\n\t {\n\t  \t\n\t \tif(q==NULL)\n\t \t {\n\t \t \treturn;\n\t     }\n\t      \n\t \t   inorder(q-&gt;left);\n\t \t   printf(\" %d \",q-&gt;data);\n\t\t   inorder(q-&gt;right);\t\n\t }\n\t\n\t\n\tvoid preorder(struct bst *q)\n\t {\n\t  \t\n\t \tif(q!=NULL)\n\t \t {\n\t\t  printf(\" %d \",q-&gt;data);\n\t\t  preorder(q-&gt;left);\n\t\t  preorder(q-&gt;right);\n\t     }\n\t     \n\t }\n\t \n\t void postorder(struct bst *q)\n\t {\n\t  \t\n\t \tif(q!=NULL)\n\t \t {\n\t \t   postorder(q-&gt;left);\n\t\t   postorder(q-&gt;right);\t\n\t\t   printf(\" %d \",q-&gt;data);\n\t\t  \n\t\t  \n\t     }\n\t     \n\t }\n\t \nOutput\n\t\n display element in inorder:- 35  45  5  40  20  10  15  30\n display element in preorder:- 30  15  10  20  40  5  45  35\n display element in postorder:- 35  45  5  40  20  10  15  30\n--------------------------------\nProcess exited after 0.04906 seconds with return value 1\nPress any key to continue . . .\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"binary-search-tree\"><strong>Binary Search Tree<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A binary tree with the additional restriction<\/li>\n\n\n\n<li>Restriction:\n<ul class=\"wp-block-list\">\n<li>The left child must always be less than the root node<\/li>\n\n\n\n<li>The right child must always be greater than the root node<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Insertion, Deletion, Search is much more efficient than a binary tree<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Maintains order in elements<\/li>\n\n\n\n<li>Can easily find the min and max nodes in the tree<\/li>\n\n\n\n<li>In order traversal gives sorted elements<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages\"><strong>Disadvantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Random access not possible<\/li>\n\n\n\n<li>Ordering adds complexity<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications\"><strong>Applications<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Suitable for sorted hierarchical data<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"demonstration-of-binary-search-tree\"><strong>Demonstration of Binary Search Tree<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;stdio.h&gt;\n#include&lt;stdlib.h&gt;\nstruct bst\n{\n       int data;\n       struct bst *left;\n       struct bst *right;\n};\n\nstruct bst * insert(struct bst *q,int val)\n{\n     struct bst * temp;\n     if(q==NULL)\n     {\n     temp=(struct bst *)malloc(sizeof(struct bst));\n     temp-&gt;data=val;\n     temp-&gt;left=NULL;\n     temp-&gt;right=NULL;\n     q=temp;\n     }\n     else\n     {\n         if(val&lt;q-&gt;data)\n         {\n            q-&gt;left=insert(q-&gt;left,val);            \n         }\n         else\n         {\n            q-&gt;right=insert(q-&gt;right,val);\n         }\n     }\n     return q;  \n} \n\n  void   inorder(struct bst *q)\n     {\n                    \n\t\t if(q==NULL)\n          {                             \n             return;\n          }\n         inorder(q-&gt;left);\n         printf(\"%dt\" , q-&gt;data);\n         inorder(q-&gt;right);\n     }\n\t \nstruct bst *search(struct bst *p, int key, struct bst **y)\n{\n  struct bst *temp;\n     if( p == NULL)\n       return(NULL);\n     temp=p;\n     *y = NULL;\n      while( temp != NULL)\n       {\n         if(temp-&gt;data == key)\n             return(temp);\n         else\n           {\n             *y = temp; \/*store this pointer as root *\/\n             if(temp-&gt;data &gt; key)\n              temp = temp-&gt;left;\n             else\n              temp = temp-&gt;right;\n           }\n       }\n      return(NULL);\n}\n\n\/* A function to delete the node whose data value is given *\/\nstruct bst * del(struct bst *p,int val)\n  {\n    struct bst *x, *y, *temp;\n    x = search(p,val,&amp;y);\n    if( x==NULL)\n    {\n      printf(\"The node does not existsn\");\n      return(p);\n    }\n    else\n    {\n\/* this code is for deleting root node*\/\n    if(x==p)\n      {\n        temp = x-&gt;left;\n        y = x-&gt;right;\n        p = temp;\n        while(temp-&gt;right != NULL)\n           temp = temp-&gt;right;\n        temp-&gt;right=y;\n        free(x);\n        return(p);\n      }\n\/* this code is for deleting node having both children *\/\n  if( x-&gt;left!=NULL &amp;&amp; x-&gt;right!=NULL)\n     {\n\n       if(y-&gt;left==x)\n       {\n         temp=x-&gt;left;\n         y-&gt;left=x-&gt;left;\n         while(temp-&gt;right != NULL)\n            temp = temp-&gt;right;\n         temp-&gt;right=x-&gt;right;\n         x-&gt;left=NULL;\n         x-&gt;right=NULL;\n       }\n       else\n        {\n          temp = x-&gt;right;\n          y-&gt;right = x-&gt;right;\n          while(temp-&gt;left!= NULL)\n             temp = temp-&gt;left;\n           temp-&gt;left=x-&gt;left;\n           x-&gt;left=NULL;\n           x-&gt;right=NULL;\n         }\n\n       free(x);\n      return(p);\n    }\n\/* this code is for deleting a node with one child*\/\n   if(x-&gt;left== NULL &amp;&amp; x-&gt;right!= NULL)\n     {\n       if(y-&gt;left== x)\n        y-&gt;left=x-&gt;right;\n        else\n        y-&gt;right= x-&gt;right;\n          x-&gt;right= NULL;\n          free(x);\n          return(p);\n     }\n       \n\tif( x-&gt;left!= NULL &amp;&amp; x-&gt;right== NULL)\n      {\n           if(y-&gt;left == x)\n              y-&gt;left= x-&gt;left ;\n           else\n              y-&gt;right= x-&gt;left;\n           x-&gt;left= NULL;\n           free(x);\n           return(p);\n      }\n\/* this code is for deleting a node with no child*\/\n    if(x-&gt;left==NULL &amp;&amp; x-&gt;right== NULL)\n       {\n           if(y-&gt;left== x)\n              y-&gt;left= NULL ;\n           else\n              y-&gt;right= NULL;\n           free(x);\n           return(p);\n        }\n    }\n}\n\t                 \n                                     \n   int main()\n     {\n         struct bst *root;\n         root=NULL; int n,val,num;\n         printf(\"n enter no. of term:-  \");\n         scanf(\"%d\",&amp;n);\n         while(n!=0)\n          {\n          \tprintf(\"n enter element:- \");\n          \tscanf(\"%d\",&amp;val);\n            root=insert(root,val);\n            n--;\n          }\n         printf(\"n display element:-.......\");\n         inorder(root);\n         printf(\"n enter element to be deleted:-   \");\n         scanf(\"%d\",&amp;num);\n         del(root,num);\n         printf(\"n display element after deleted:-.......\");\n         inorder(root);\n         return 1;\n     \n     }   \n     \n       \n  Output:\n  \n enter no. of term:- 5\n\n enter element:- 12\n\n enter element:- 34\n\n enter element:- 56\n\n enter element:- 10\n\n enter element:- 23\n\n display element:-.......10     12      23      34      56\n enter element to be deleted:-   23\n\n display element after deleted:-.......10       12      34      56\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"heap\"><strong>Heap<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Binary Heap can be visualized array as a complete binary tree<\/li>\n\n\n\n<li>Arr[0] element will be treated as root<\/li>\n\n\n\n<li>length(A) - size of array<\/li>\n\n\n\n<li>heapSize(A) - size of heap<\/li>\n\n\n\n<li>Generally used when we are dealing with minimum and maximum elements<\/li>\n\n\n\n<li>For ith node<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>(i-1)\/2<\/td><td>Parent<\/td><\/tr><tr><td>(2*i)+1<\/td><td>Left child<\/td><\/tr><tr><td>(2*i)+2<\/td><td>Right Child<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Can be of 2 types: min heap and max heap<\/li>\n\n\n\n<li>Min heap keeps smallest and element and top and max keeps the largest&nbsp;<\/li>\n\n\n\n<li>O(1) for dealing with min or max elements<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages\"><strong>Disadvantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Random access not possible<\/li>\n\n\n\n<li>Only min or max element is available for accessibility<\/li>\n<\/ul>\n\n\n\n<p><strong>Applications<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Suitable for applications dealing with priority<\/li>\n\n\n\n<li>Scheduling algorithm<\/li>\n\n\n\n<li>caching<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"heap-examples\"><strong>Heap Examples <\/strong><\/h2>\n\n\n\n<p><strong>&nbsp;&nbsp;Heap data structure program in C<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt;\nint size = 0;\nvoid swap(int *p, int *q)\n{\n  int temp = *q;\n  *q = *p;\n  *p = temp;\n}\nvoid heapify(int array&#091;], int size, int i)\n{\n  if (size == 1)\n  {\n    printf(\"Single element in the heap\");\n  }\n  else\n  {\n    int largest = i;\n    int l = 2 * i + 1;\n    int r = 2 * i + 2;\n    if (l &lt; size &amp;&amp; array&#091;l] &gt; array&#091;largest])\n      largest = l;\n    if (r &lt; size &amp;&amp; array&#091;r] &gt; array&#091;largest])\n      largest = r;\n    if (largest != i)\n    {\n      swap(&amp;array&#091;i], &amp;array&#091;largest]);\n      heapify(array, size, largest);\n    }\n  }\n}\nvoid insert(int array&#091;], int newNumber)\n{\n  if (size == 0)\n  {\n    array&#091;0] = newNumber;\n    size += 1;\n  }\n  else\n  {\n    array&#091;size] = newNumber;\n    size += 1;\n    for (int i = size \/ 2 - 1; i &gt;= 0; i--)\n    {\n      heapify(array, size, i);\n    }\n  }\n}\nvoid deleteRoot(int array&#091;], int num)\n{\n  int i;\n  for (i = 0; i &lt; size; i++)\n  {\n    if (num == array&#091;i])\n      break;\n  }\n\n  swap(&amp;array&#091;i], &amp;array&#091;size - 1]);\n  size -= 1;\n  for (int i = size \/ 2 - 1; i &gt;= 0; i--)\n  {\n    heapify(array, size, i);\n  }\n}\nvoid printArray(int array&#091;], int size)\n{\n  for (int i = 0; i &lt; size; ++i)\n    printf(\"%d \", array&#091;i]);\n  printf(\"n\");\n}\nint main()\n{\n  int array&#091;10];\n\n  insert(array, 4);\n  insert(array, 2);\n  insert(array, 8);\n  insert(array, 1);\n  insert(array, 3);\n  insert(array, 6);\n  printf(\"Max Heap array: \");\n  printArray(array, size);\n\n  deleteRoot(array, 4);\n\n  printf(\"After deleting an element: \");\n\n  printArray(array, size);\n}\n<\/code><\/pre>\n\n\n\n<p><strong>Input and Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/a_RZmZ9G8BB1V6UP0hERxlsQYGdiXJxmV1_sIH6PWrbiOo70IOrWv5k7ompWNSJZO0L2YYHS-2HoQabcFd448HwZRh5y98FDoNjjf8chcoynMeBEpTchCZpQphqNqoSj87cQipZC\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"hashing\"><strong>Hashing<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Uses special Hash function<\/li>\n\n\n\n<li>A hash function maps element to an address for storage<\/li>\n\n\n\n<li>This provides constant-time access<\/li>\n\n\n\n<li>Collision is handled by collision resolution techniques<\/li>\n\n\n\n<li>Collision resolution technique\n<ul class=\"wp-block-list\">\n<li>Chaining<\/li>\n\n\n\n<li>Open Addressing<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The hash function helps in fetching element in constant time<\/li>\n\n\n\n<li>An efficient way to store elements<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages\"><strong>Disadvantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Collision resolution increases complexity<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications\"><strong>Applications<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Suitable for the application needs constant time fetching<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"graph\"><strong>Graph<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Basically it is a group of edges and vertices<\/li>\n\n\n\n<li>Graph representation\n<ul class=\"wp-block-list\">\n<li>G(V, E): where V(G) represents a set of vertices and E(G) represents a set of edges<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>A graph can be directed or undirected<\/li>\n\n\n\n<li>A graph can be connected or disjoint<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advantages\"><strong>Advantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>finding connectivity<\/li>\n\n\n\n<li>Shortest path<\/li>\n\n\n\n<li>min cost to reach from 1 pt to other<\/li>\n\n\n\n<li>Min spanning tree<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"disadvantages\"><strong>Disadvantages<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Storing graph(Adjacency list and Adjacency matrix) can lead to complexities<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"applications\"><strong>Applications<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Suitable for a circuit network<\/li>\n\n\n\n<li>Suitable for applications like Facebook, LinkedIn, etc<\/li>\n\n\n\n<li>Medical science<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"graph-examples\"><strong>Graph Examples<\/strong><\/h2>\n\n\n\n<p>Adjacency list representation in C<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n\nstruct node {\n  int vertex;\n  struct node* next;\n};\nstruct node* createNode(int);\n\nstruct Graph {\n  int numVertices;\n  struct node** adjacentLists;\n};\n\nstruct node* createNode(int v) {\n  struct node* newNode = malloc(sizeof(struct node));\n  newNode-&gt;vertex = v;\n  newNode-&gt;next = NULL;\n  return newNode;\n}\n\nstruct Graph* createAGraph(int vertices) {\n  struct Graph* graph = malloc(sizeof(struct Graph));\n  graph-&gt;numVertices = vertices;\n\n  graph-&gt;adjacentLists = malloc(vertices * sizeof(struct node*));\n\n  int i;\n  for (i = 0; i &lt; vertices; i++)\n    graph-&gt;adjacentLists&#091;i] = NULL;\n\n  return graph;\n}\n\nvoid addEdge(struct Graph* graph, int a, int b) {\n  struct node* newNode = createNode(b);\n  newNode-&gt;next = graph-&gt;adjacentLists&#091;a];\n  graph-&gt;adjacentLists&#091;a] = newNode;\n\n  \n  newNode = createNode(a);\n  newNode-&gt;next = graph-&gt;adjacentLists&#091;b];\n  graph-&gt;adjacentLists&#091;b] = newNode;\n}\n\nvoid printGraph(struct Graph* graph) {\n  int v;\n  for (v = 0; v &lt; graph-&gt;numVertices; v++) {\n    struct node* temp = graph-&gt;adjacentLists&#091;v];\n    printf(\"n Vertex %dn: \", v);\n    while (temp) {\n      printf(\"%d -&gt; \", temp-&gt;vertex);\n      temp = temp-&gt;next;\n    }\n    printf(\"n\");\n  }\n}\n\nint main() {\n  struct Graph* graph = createAGraph(4);\n  addEdge(graph, 0, 1);\n  addEdge(graph, 0, 3);\n  addEdge(graph, 0, 2);\n  addEdge(graph, 1, 3);\n\n  printGraph(graph);\n\n  return 0;\n}\n<\/code><\/pre>\n\n\n\n<p><strong>Input and Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/Ftbz2ta8aQV8whTWhhXOGtDuYZXEtLiwBIQeZz7iFrCsKh2W6Hy_Pur3_Gje1zXFHs0oUNdZGUyu_-u1Mj2W77nwNmIe9DjXCs8lPw-f1UZwjIHNykhvBxFrOzEupEF_OXu4dc-J\" alt=\"\"\/><\/figure>\n\n\n\n<p>We hope you enjoyed this tutorial about Data Structures using C!. Unlock new opportunities for growth by enrolling in our <a href=\"https:\/\/www.mygreatlearning.com\/academy\">free online courses<\/a> to enhance your knowledge and advance your career.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is C Programming Language? You can also take up the Free Data Structures for C Course on Great Learning Academy and upskill. Learn more about the Implementation of Data Structures using C programming language, Arrays, Linked Lists, Binary Tree, and so much more. For more advanced skills, consider enrolling in our Pro course to [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":17229,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[36889],"content_type":[],"class_list":["post-17124","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-c-programming-2"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Data Structures in C<\/title>\n<meta name=\"description\" content=\"Data Structures using C: This is a way to arrange data in computers. Array, Linked List, Stack Queue, and Binary Tree are some examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What are the Data Structure in C and How it works?\" \/>\n<meta property=\"og:description\" content=\"Data Structures using C: This is a way to arrange data in computers. Array, Linked List, Stack Queue, and Binary Tree are some examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-07T10:42:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-25T11:47:29+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"What are the Data Structure in C and How it works?\",\"datePublished\":\"2022-01-07T10:42:00+00:00\",\"dateModified\":\"2024-09-25T11:47:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/\"},\"wordCount\":1190,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/BLOG-Images_7-7-2020-06.png\",\"keywords\":[\"C Programming\"],\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/\",\"name\":\"Data Structures in C\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/BLOG-Images_7-7-2020-06.png\",\"datePublished\":\"2022-01-07T10:42:00+00:00\",\"dateModified\":\"2024-09-25T11:47:29+00:00\",\"description\":\"Data Structures using C: This is a way to arrange data in computers. Array, Linked List, Stack Queue, and Binary Tree are some examples.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/BLOG-Images_7-7-2020-06.png\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/BLOG-Images_7-7-2020-06.png\",\"width\":1000,\"height\":700,\"caption\":\"Data Structures using C\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-structures-using-c\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IT\\\/Software Development\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/software\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What are the Data Structure in C and How it works?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Data Structures in C","description":"Data Structures using C: This is a way to arrange data in computers. Array, Linked List, Stack Queue, and Binary Tree are some examples.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/","og_locale":"en_US","og_type":"article","og_title":"What are the Data Structure in C and How it works?","og_description":"Data Structures using C: This is a way to arrange data in computers. Array, Linked List, Stack Queue, and Binary Tree are some examples.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2022-01-07T10:42:00+00:00","article_modified_time":"2024-09-25T11:47:29+00:00","og_image":[{"width":1000,"height":700,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png","type":"image\/png"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"What are the Data Structure in C and How it works?","datePublished":"2022-01-07T10:42:00+00:00","dateModified":"2024-09-25T11:47:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/"},"wordCount":1190,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png","keywords":["C Programming"],"articleSection":["IT\/Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/","url":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/","name":"Data Structures in C","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png","datePublished":"2022-01-07T10:42:00+00:00","dateModified":"2024-09-25T11:47:29+00:00","description":"Data Structures using C: This is a way to arrange data in computers. Array, Linked List, Stack Queue, and Binary Tree are some examples.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png","width":1000,"height":700,"caption":"Data Structures using C"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/data-structures-using-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IT\/Software Development","item":"https:\/\/www.mygreatlearning.com\/blog\/software\/"},{"@type":"ListItem","position":3,"name":"What are the Data Structure in C and How it works?"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png",1000,700,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06-150x150.png",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06-300x210.png",300,210,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06-768x538.png",768,538,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png",1000,700,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png",1000,700,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png",1000,700,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png",640,448,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png",96,67,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/BLOG-Images_7-7-2020-06.png",150,105,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"What is C Programming Language? You can also take up the Free Data Structures for C Course on Great Learning Academy and upskill. Learn more about the Implementation of Data Structures using C programming language, Arrays, Linked Lists, Binary Tree, and so much more. For more advanced skills, consider enrolling in our Pro course to&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=17124"}],"version-history":[{"count":39,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17124\/revisions"}],"predecessor-version":[{"id":111842,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17124\/revisions\/111842"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/17229"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=17124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=17124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=17124"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=17124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}