<?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: Bhargava-Nandanavanam</title>
    <description>The latest articles on DEV Community by Bhargava-Nandanavanam (@bhargavanandanavanam).</description>
    <link>https://dev.to/bhargavanandanavanam</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%2F521966%2Fe77e7a50-09b1-4b7f-8bb4-db1f9adc2977.png</url>
      <title>DEV Community: Bhargava-Nandanavanam</title>
      <link>https://dev.to/bhargavanandanavanam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bhargavanandanavanam"/>
    <language>en</language>
    <item>
      <title>Object Oriented Programming</title>
      <dc:creator>Bhargava-Nandanavanam</dc:creator>
      <pubDate>Mon, 25 Oct 2021 16:28:32 +0000</pubDate>
      <link>https://dev.to/bhargavanandanavanam/object-oriented-programming-2ahh</link>
      <guid>https://dev.to/bhargavanandanavanam/object-oriented-programming-2ahh</guid>
      <description>&lt;p&gt;Object-oriented programming (OOP) is a fundamental programming paradigm used by nearly every developer at some point in their career. OOP is the most popular programming paradigm and is taught as the standard way to code for most of a programmers educational career.&lt;/p&gt;

&lt;p&gt;Today we will break down the basics of what makes a program object-oriented so that you can start to utilize this paradigm in your own projects and interviews.&lt;/p&gt;

&lt;p&gt;What is Object Oriented Programming?&lt;/p&gt;

&lt;p&gt;Object Oriented programming (OOP) is a programming paradigm that relies on the concept of classes and objects. It is used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which are used to create individual instances of objects. There are many object-oriented programming languages including JavaScript, C++, Java, and Python.&lt;/p&gt;

&lt;p&gt;A class is an abstract blueprint used to create more specific, concrete objects. Classes often represent broad categories, like Car or Dog that share attributes. These classes define what attributes an instance of this type will have, like color, but not the value of those attributes for a specific object.&lt;/p&gt;

&lt;p&gt;Classes can also contain functions, called methods available only to objects of that type. These functions are defined within the class and perform some action helpful to that specific type of object.&lt;/p&gt;

&lt;p&gt;What is Object Oriented Programming? OOP Explained in Depth&lt;br&gt;
Apr 15, 2020 - 15 min read&lt;br&gt;
Erin Doherty&lt;br&gt;
editor-page-cover&lt;/p&gt;

&lt;p&gt;Object-oriented programming (OOP) is a fundamental programming paradigm used by nearly every developer at some point in their career. OOP is the most popular programming paradigm and is taught as the standard way to code for most of a programmers educational career.&lt;/p&gt;

&lt;p&gt;Today we will break down the basics of what makes a program object-oriented so that you can start to utilize this paradigm in your own projects and interviews.&lt;/p&gt;

&lt;p&gt;What is Object Oriented Programming?&lt;/p&gt;

&lt;p&gt;Object Oriented programming (OOP) is a programming paradigm that relies on the concept of classes and objects. It is used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which are used to create individual instances of objects. There are many object-oriented programming languages including JavaScript, C++, Java, and Python.&lt;/p&gt;

&lt;p&gt;A class is an abstract blueprint used to create more specific, concrete objects. Classes often represent broad categories, like Car or Dog that share attributes. These classes define what attributes an instance of this type will have, like color, but not the value of those attributes for a specific object.&lt;/p&gt;

&lt;p&gt;Classes can also contain functions, called methods available only to objects of that type. These functions are defined within the class and perform some action helpful to that specific type of object.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For example, our Car class may have a method repaint that changes the color attribute of our car. This function is only helpful to objects of type Car, so we declare it within the Car class thus making it a method.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Class templates are used as a blueprint to create individual objects. These represent specific examples of the abstract class, like myCar or goldenRetriever. Each object can have unique values to the properties defined in the class.&lt;/p&gt;

&lt;p&gt;Benefits of OOP&lt;/p&gt;

&lt;p&gt;OOP models complex things as reproducible, simple structures.&lt;br&gt;
Reusable, OOP objects can be used across programs.&lt;br&gt;
Allows for class-specific behavior through polymorphism.&lt;br&gt;
Easier to debug, classes often contain all applicable information to them.&lt;br&gt;
Secure, protects information through encapsulation.&lt;/p&gt;

&lt;p&gt;Grouping related information together to form a class structure makes the code shorter and easier to maintain.&lt;/p&gt;

&lt;p&gt;In the dogsitting example, here’s how a programmer could think about organizing an OOP:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a parent class for all dogs as a blueprint of information and behaviors (methods) that all dogs will have, regardless of type.

Create child classes to represent different subcategories of dog under the generic parent blueprint.

Add unique attributes and behaviors to the child classes to represent differences

Create objects from the child class that represent dogs within that subgroup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The diagram below represents how to design an OOP program: grouping the related data and behaviors together to form a simple template then creating subgroups for specialized data and behavior.&lt;/p&gt;

&lt;p&gt;The Dog class is a generic template, containing only the structure about data and behaviors common to all dogs.&lt;/p&gt;

&lt;p&gt;We then create two child classes of Dog, HerdingDog and TrackingDog. These have the inherited behaviors of Dog (bark()) but also behavior unique to dogs of that subtype.&lt;/p&gt;

&lt;p&gt;Finally,we create objects of the HerdingDog type to represent the individual dogs Fluffy and Maisel.&lt;/p&gt;

&lt;p&gt;We can also create objects like Rufus that fit under the broad class of Dog but do not fit under either HerdingDog or TrackingDog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KN9Dr0zj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q5x8c5cg4ku85cnmrk9z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KN9Dr0zj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q5x8c5cg4ku85cnmrk9z.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building blocks of OOP:&lt;/p&gt;

&lt;p&gt;Next, we’ll take a deeper look at each of the fundamental building blocks of an OOP program used above:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Classes
Objects
Methods
Attributes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>oops</category>
    </item>
    <item>
      <title>Operators &amp; Arrays in C</title>
      <dc:creator>Bhargava-Nandanavanam</dc:creator>
      <pubDate>Fri, 07 May 2021 13:56:08 +0000</pubDate>
      <link>https://dev.to/bhargavanandanavanam/operators-arrays-in-c-2aof</link>
      <guid>https://dev.to/bhargavanandanavanam/operators-arrays-in-c-2aof</guid>
      <description>&lt;p&gt;Operators are the foundation of any programming language. Thus the functionality of the C language is incomplete without the use of operators. Operators allow us to perform different kinds of operations on operands. In C, operators in Can be categorized in the following categories:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Arithmetic Operators (+, -, *, /, %, post-increment, pre-increment, post-decrement, pre-decrement)
Relational Operators (==, !=, &amp;gt;, &amp;lt;, &amp;gt;= &amp;amp; &amp;lt;=) Logical Operators (&amp;amp;&amp;amp;, || and !)
Bitwise Operators (&amp;amp;, |, ^, ~, &amp;gt;&amp;gt; and &amp;lt;&amp;lt;) Assignment Operators (=, +=, -=, *=, etc.)
Other Operators (conditional, comma, size of, address, redirection)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Logical Operators:&lt;/p&gt;

&lt;p&gt;They are used to combine two or more conditions/constraints or to complement the evaluation of the original condition under consideration. They are described below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Logical AND operator: The &amp;amp;&amp;amp; operator returns true when both the conditions under consideration are satisfied. Otherwise, it returns false. For example, a &amp;amp;&amp;amp; b returns true when both a and b are true (i.e. non-zero).

Logical OR operator: The || operator returns true even if one (or both) of the conditions under consideration is satisfied. Otherwise it returns false. For example, a || b returns true if one of a or b or both are true (i.e. non-zero). Of course, it returns true when both a and b are true.

Logical NOT operator: The ! operator returns true the condition in consideration is not satisfied. Otherwise, it returns false. For example, !a returns true if a is false, i.e. when a=0.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0g62EKno--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlnixo1r91zvpds88p5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0g62EKno--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlnixo1r91zvpds88p5a.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bitwise Operators:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The &amp;amp; (bitwise AND) in C or C++ takes two numbers as operands and does AND on every bit of two numbers. The result of AND is 1 only if both bits are 1.

The | (bitwise OR) in C or C++ takes two numbers as operands and does OR on every bit of two numbers. The result of OR is 1 if any of the two bits is 1.

The ^ (bitwise XOR) in C or C++ takes two numbers as operands and does XOR on every bit of two numbers. The result of XOR is 1 if the two bits are different.

The &amp;lt;&amp;lt; (left shift) in C or C++ takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift.

The &amp;gt;&amp;gt; (right shift) in C or C++ takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift.

The ~ (bitwise NOT) in C or C++ takes one number and inverts all bits of it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bdoKL3HF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqe7n83gu34v99va4873.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bdoKL3HF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqe7n83gu34v99va4873.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Assignment Operators:&lt;/p&gt;

&lt;p&gt;Assignment operators are used to assigning value to a variable. The left side operand of the assignment operator is a variable and the right side operand of the assignment operator is a value. The value on the right side must be of the same data-type as the variable on the left side otherwise the compiler will raise an error.&lt;/p&gt;

&lt;p&gt;Different types of assignment operators are shown below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=: This is the simplest assignment operator. This operator is used to assign the value on the right to the variable on the left.

+=: This operator is a combination of + and = operators. This operator first adds the current value of the variable on left to the value on the right and then assigns the result to the variable on the left.

-=: This operator is a combination of - and = operators. This operator first subtracts the current value of the variable on left from the value on the right and then assigns the result to the variable on the left.

*=: This operator is a combination of * and = operators. This operator first multiplies the current value of the variable on left to the value on the right and then assigns the result to the variable on the left.

/=: This operator is a combination of / and = operators. This operator first divides the current value of the variable on left by the value on the right and then assigns the result to the variable on the left.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ig6cYwdD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ldm8wym9la8o4t9pbqfe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ig6cYwdD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ldm8wym9la8o4t9pbqfe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Relational operators&lt;/p&gt;

&lt;p&gt;Relational operators are used to compare two values in order to understand the relationship of a number pair (e.g., less than, greater than, equal to, etc.) Let’s see them one by one:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Equal to operator: Represented as ==, the equal to operator checks if the two given operands are equal. If they are, it returns true. Otherwise, it returns false. For example, 5==5 will return true.

Not equal to operator: Represented as !=, the not equal to operator checks if the two given operands are equal. If they are not, it returns true. Otherwise, it returns false. It is the exact Boolean complement of the == operator. For example, 5!=5 will return false.

Greater than operator: Represented as &amp;gt;, the greater than operator checks if the first operand is greater than the second operand. If so, it returns true. Otherwise, it returns false. For example, 6&amp;gt;5 will return true.

Less than operator: Represented as &amp;lt;, the less-than operator checks if the first operand is lessthan the second operand. If so, it returns true. Otherwise, it returns false. For example, 6&amp;lt;5 will return false.

Greater than or equal to the operator: Represented as &amp;gt;=, the greater than or equal to operator checks if the first operand is greater than or equal to the second operand. If it is, it returns true; else, it returns false. For example, 5&amp;gt;=5 will return true.

Less than or equal to operator: Represented as &amp;lt;=, the less than or equal to operator checks if the first operand is less than or equal to the second operand. If it is, it returns true else false. For example, 5&amp;lt;=5 will also return true.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yLYhA2TX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aby400leugcmtqcn917o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yLYhA2TX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aby400leugcmtqcn917o.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Arrays:&lt;/p&gt;

&lt;p&gt;An array is a collection of data items, all of the same type, accessed using a common name.&lt;br&gt;
A one-dimensional array is like a list;  A two dimensional array is like a table;  The C language places no limits on the number of dimensions in an array, though specific implementations may.&lt;br&gt;
Some texts refer to one-dimensional arrays as vectors, two-dimensional arrays as matrices, and use the general term arrays when the number of dimensions is unspecified or unimportant.&lt;/p&gt;

&lt;p&gt;Declaring Arrays:&lt;/p&gt;

&lt;p&gt;Array variables are declared identically to variables of their data type, except that the variable name is followed by one pair of square [ ] brackets for each dimension of the array.&lt;br&gt;
Uninitialized arrays must have the dimensions of their rows, columns, etc. listed within the square brackets.&lt;br&gt;
Dimensions used when declaring arrays in C must be positive integral constants or constant expressions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mfrMOrir--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9cgzva2qgbx1a674wk3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mfrMOrir--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9cgzva2qgbx1a674wk3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is called a single-dimensional array. The arraySize must be an integer constant greater than zero and type can be any valid C data type. For example, to declare a 10-element array called balance of type double, use this statement &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g6iykhCz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gdz1elqr94jl9eudmjme.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g6iykhCz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gdz1elqr94jl9eudmjme.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initializing Arrays&lt;/p&gt;

&lt;p&gt;Arrays may be initialized when they are declared, just as any other variables.&lt;br&gt;
Place the initialization data in curly {} braces following the equals sign.  Note the use of commas in the examples below.&lt;br&gt;
An array may be partially initialized, by providing fewer data items than the size of the array.  The remaining array elements will be automatically initialized to zero.&lt;br&gt;
If an array is to be completely initialized, the dimension of the array is not required.  The compiler will automatically size the array to fit the initialized data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HmDqxW32--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76rzvy3ahr9jdxkhc90b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HmDqxW32--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76rzvy3ahr9jdxkhc90b.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SAMPLE 1-D Array Program:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--upQrm6D8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cz9sr5z59wicqaue0bss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--upQrm6D8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cz9sr5z59wicqaue0bss.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Multidimensional Arrays:&lt;/p&gt;

&lt;p&gt;Multi-dimensional arrays are declared by providing more than one set of square [ ] brackets after the variable name in the declaration statement.&lt;/p&gt;

&lt;p&gt;One dimensional arrays do not require the dimension to be given if the array is to be completely initialized.  By analogy, multi-dimensional arrays do not require the first dimension to be given if the array is to be completely initialized.  All dimensions after the first must be given in any case.&lt;br&gt;
For two dimensional arrays, the first dimension is commonly considered to be the number of rows, and the second dimension the number of  columns.  We will use this convention when discussing two dimensional arrays.&lt;br&gt;
Two dimensional arrays are considered by C/C++ to be an array of ( single dimensional arrays ).  For example, "int numbers[ 5 ][ 6 ]"  would refer to a single dimensional array of 5 elements, wherein each element is a single dimensional array of 6 integers.  By extension, "int numbers[ 12 ][ 5 ][ 6 ]" would refer to an array of twelve elements, each of which is a two dimensional array, and so on.&lt;br&gt;
Another way of looking at this is that C stores two dimensional arrays by rows, with all elements of a row being stored together as a single unit.  Knowing this can sometimes lead to more efficient programs. &lt;br&gt;
Multidimensional arrays may be completely initialized by listing all data elements within a single pair of curly {} braces, as with single dimensional arrays.&lt;br&gt;
It is better programming practice to enclose each row within a separate subset of curly {} braces, to make the program more readable.  This is required if any row other than the last is to be partially initialized.  When subsets of braces are used, the last item within braces is not followed by a comma, but the subsets are themselves separated by commas.&lt;br&gt;
Multidimensional arrays may be partially initialized by not providing complete initialization data.  Individual rows of a multidimensional array may be partially initialized, provided that subset braces are used.&lt;br&gt;
Individual data items in a multidimensional array are accessed by fully qualifying an array element.  Alternatively, a smaller dimensional array may be accessed by partially qualifying the array name.  For example, if  "data" has been declared as a three dimensional array of floats, then data[ 1 ][ 2 ][ 5 ] would refer to a float, data[ 1 ][ 2 ] would refer to a one-dimensional array of floats, and data[ 1 ] would refer to a two-dimensional array of floats.  The reasons for this and the incentive to do this relate to memory-management issues that are beyond the scope of these notes.&lt;/p&gt;

&lt;p&gt;SAMPLE 2-D Array Program:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zmmy7S07--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo62ts8s6sf1xvvgf1pu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zmmy7S07--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo62ts8s6sf1xvvgf1pu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Advantages of Arrays:&lt;/p&gt;

&lt;p&gt;Arrays represent multiple data items of the same type using a single name.&lt;br&gt;
In arrays, the elements can be accessed randomly by using the index number.&lt;br&gt;
Arrays allocate memory in contiguous memory locations for all its elements. Hence there is no chance of extra memory being allocated in case of arrays. This avoids memory overflow or shortage of memory in arrays.&lt;/p&gt;

&lt;p&gt;Applications:&lt;br&gt;
Arrays are commonly used in computer programs to organize data so that a related set of values can be easily sorted or searched.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>operators</category>
      <category>arrays</category>
      <category>coding</category>
    </item>
    <item>
      <title>C Programming</title>
      <dc:creator>Bhargava-Nandanavanam</dc:creator>
      <pubDate>Fri, 27 Nov 2020 19:18:00 +0000</pubDate>
      <link>https://dev.to/bhargavanandanavanam/c-programming-3ek8</link>
      <guid>https://dev.to/bhargavanandanavanam/c-programming-3ek8</guid>
      <description>&lt;p&gt;C (Programming Language)&lt;br&gt;
    C is a general-purpose, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, with a static type system. By design, C provides constructs that map efficiently to typical machine instructions. It has found lasting use in applications previously coded in assembly language. Such applications include operating systems and various application software for computer architectures that range from supercomputers to PLCs and embedded systems.&lt;/p&gt;

&lt;p&gt;Data Types:&lt;br&gt;
In the C programming language, data types constitute the semantics and characteristics of storage of data elements. They are expressed in the language syntax in form of declarations for memory locations or variables. Data types also determine the types of operations or methods of processing of data elements. &lt;br&gt;
The C language provides basic arithmetic types, such as integer and real number types, and syntax to build array and compound types. Headers for the C standard library, to be used via include directives, contain definitions of support types, that have additional properties, such as providing storage with an exact size, independent of the language implementation on specific hardware platforms.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KlS8GbXt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wdd0eckta5f6cleqk3bq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KlS8GbXt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wdd0eckta5f6cleqk3bq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fundamental Data Types:&lt;br&gt;
A fundamental or primitive type is a data type where the values that it can represent have a very simple nature (a number, a character or a truth-value); the primitive types are the most basic building blocks for any programming language and are the base for more complex data types.There are five types of fundamental data types&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Integer&lt;/li&gt;
&lt;li&gt; Floating&lt;/li&gt;
&lt;li&gt; Character&lt;/li&gt;
&lt;li&gt; Void&lt;/li&gt;
&lt;li&gt; Boolean&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Integer:&lt;br&gt;
Integers are used to store whole numbers.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gGCHV7_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dloxfkteuzl1pmo3spwn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gGCHV7_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dloxfkteuzl1pmo3spwn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Floating:&lt;br&gt;
Floating types are used to store real numbers.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JtNmCYCN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gp1ehow37ylha6x2zj26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JtNmCYCN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gp1ehow37ylha6x2zj26.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Character:&lt;br&gt;
Character types are used to store characters value. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kWCKL-uS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gubmm04kj2u0h59w9mbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kWCKL-uS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gubmm04kj2u0h59w9mbf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Void:&lt;br&gt;
void type means no value. This is usually used to specify the type of functions which returns nothing. We will get acquainted to this datatype as we start learning more advanced topics in C language, like functions, pointers etc.&lt;/p&gt;

&lt;p&gt;Boolean:&lt;br&gt;
In C, Boolean is a data type that contains two types of values, i.e., 0 and 1. Basically, the bool type value represents two types of behavior, either true or false. Here, '0' represents false value, while '1' represents true value.&lt;/p&gt;

&lt;p&gt;Syntax :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AobP4t5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ufw58r14t81ekzdnh2zf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AobP4t5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ufw58r14t81ekzdnh2zf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Derived Data Types:&lt;br&gt;
The functions that we create in a program are known as user defined functions or in other words you can say that a function created by user is known as user defined function. These are five types:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Functions&lt;/li&gt;
&lt;li&gt; Arrays&lt;/li&gt;
&lt;li&gt; Pointers&lt;/li&gt;
&lt;li&gt; Unions&lt;/li&gt;
&lt;li&gt; Structures
Unions and Structures are classified as User Defined Data Types.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Functions:&lt;br&gt;
A function is a group of statements that together perform a task. Every C program has at least one function, which is main(), and all the most trivial programs can define additional functions.&lt;br&gt;
We can divide up your code into separate functions. How you divide up your code among different functions is up to you, but logically the division is such that each function performs a specific task.&lt;br&gt;
C functions can be classified into two categories,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Library functions&lt;/li&gt;
&lt;li&gt; User-defined functions
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SsoyraeW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z40qg36w2gkyid5lzyga.jpg" alt="Alt Text"&gt;
Library functions are those functions which are already defined in C library, example printf(), scanf(), strcat() etc. You just need to include appropriate header files to use these functions. These are already declared and defined in C libraries.
User-defined functions on the other hand, are those functions which are defined by the user at the time of writing program. These functions are made for code reusability and for saving time and space.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Defining a Function:&lt;br&gt;
The general form of a function definition in C programming language is as follows −&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gls9Mc79--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tawn80jw740iamyf27tu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gls9Mc79--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tawn80jw740iamyf27tu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
A function definition in C programming consists of a function header and a function body. Here are all the parts of a function −&lt;br&gt;
•Return Type − A function may return a value. The return_type is the data type of the value the function returns. Some functions perform the desired operations without returning a value. In this case, the return_type is the keyword void.&lt;br&gt;
•Function Name − This is the actual name of the function. The function name and the parameter list together constitute the function signature.&lt;br&gt;
•Parameters − A parameter is like a placeholder. When a function is invoked, you pass a value to the parameter. This value is referred to as actual parameter or argument. The parameter list refers to the type, order, and number of the parameters of a function. Parameters are optional; that is, a function may contain no parameters.&lt;br&gt;
•Function Body − The function body contains a collection of statements that define what the function does.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OI4s26m3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wen060i6hllvd8pjy2ic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OI4s26m3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wen060i6hllvd8pjy2ic.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Function Arguments:&lt;br&gt;
If a function is to use arguments, it must declare variables that accept the values of the arguments. These variables are called the formal parameters of the function.&lt;br&gt;
Formal parameters behave like other local variables inside the function and are created upon entry into the function and destroyed upon exit.&lt;br&gt;
While calling a function, there are two ways in which arguments can be passed to a function &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Call by Value&lt;/li&gt;
&lt;li&gt; Call by Reference&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Call by Value:&lt;br&gt;
        The call by value method of passing arguments to a function copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument.&lt;br&gt;
By default, C programming uses call by value to pass arguments. In general, it means the code within a function cannot alter the arguments used to call the function.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ScR9vqal--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mzt4i6q9ekz9a9bnqhe7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ScR9vqal--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mzt4i6q9ekz9a9bnqhe7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Call by Reference:&lt;br&gt;
        The call by reference method of passing arguments to a function copies the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used in the call. It means the changes made to the parameter affect the passed argument.&lt;br&gt;
To pass a value by reference, argument pointers are passed to the functions just like any other value. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YWFFRTlF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3jryq6uf743fq3t075p0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YWFFRTlF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3jryq6uf743fq3t075p0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Arrays:&lt;br&gt;
Arrays are referred to as structured data types. An array is defined as finite ordered collection of homogenous data, stored in contiguous memory locations.&lt;br&gt;
Here the words,&lt;br&gt;
•finite means data range must be defined.&lt;br&gt;
•ordered means data must be stored in continuous memory addresses.&lt;br&gt;
•homogenous means data must be of similar data type.&lt;/p&gt;

&lt;p&gt;Declaring Arrays:&lt;br&gt;
     To declare an array in C, a programmer specifies the type of the elements and the number of elements required by an array as follows &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r5I2nakO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u8435hf4og7cqyga684k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r5I2nakO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u8435hf4og7cqyga684k.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k0Tv555f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/71wstqv1x8vbeemdjrcb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k0Tv555f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/71wstqv1x8vbeemdjrcb.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Here int is the data type, arr is the name of the array and 10 is the size of array. It means array arr can only contain 10 elements of int type.&lt;br&gt;
Index of an array starts from 0 to size-1 i.e first element of arr array will be stored at arr[0] address and the last element will occupy arr[9].&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dsZ8V3MG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gn4lqy78teazdpvkanuf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dsZ8V3MG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gn4lqy78teazdpvkanuf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two dimensional Arrays:&lt;br&gt;
C language supports multidimensional arrays also. The simplest form of a multidimensional array is the two-dimensional array. Both the row's and column's index begins from 0.&lt;br&gt;
Two-dimensional arrays are declared as follows,&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TiDLhJLy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zpmraczd6rzfc1zb1mvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TiDLhJLy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zpmraczd6rzfc1zb1mvf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pGb9cX63--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tn4qsgrzao8nykp95mrt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pGb9cX63--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tn4qsgrzao8nykp95mrt.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RFaDR_Ay--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1fa7c6a3jbwgzl46bj06.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RFaDR_Ay--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1fa7c6a3jbwgzl46bj06.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pointers:&lt;br&gt;
A Pointer in C language is a variable which holds the address of another variable of same data type.&lt;/p&gt;

&lt;p&gt;Pointers are used to access memory and manipulate the address.&lt;/p&gt;

&lt;p&gt;Pointers are one of the most distinct and exciting features of C language. It provides power and flexibility to the language. Although pointers may appear a little confusing and complicated in the beginning, but trust me, once you understand the concept, you will be able to do so much more with C language. &lt;/p&gt;

&lt;p&gt;Address in C:&lt;br&gt;
Whenever a variable is defined in C language, a memory location is assigned for it, in which its value will be stored. We can easily check this memory address, using the &amp;amp; symbol.&lt;/p&gt;

&lt;p&gt;If var is the name of the variable, then &amp;amp;var will give it's address.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nzw2kIA2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bnymbm5b2cdfvzxxl77o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nzw2kIA2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bnymbm5b2cdfvzxxl77o.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;User-Defined Data Types:&lt;br&gt;
          A user-defined data type (UDT) is a data type that derived from an existing data type. You can use UDTs to extend the built-in types already available and create your own customized data types.There are two types if UDT’s in C Language:&lt;br&gt;
1.Unions&lt;br&gt;
2.Structures&lt;/p&gt;

&lt;p&gt;Unions:&lt;br&gt;
       It is a collection of variables of different datatypes in the same memory location.We can define a union with many members, but at a given point of time only one member can contain a value.Unions can be very handy when you need to talk to peripherals through some memory mapped registers.&lt;/p&gt;

&lt;p&gt;Syntax for Declaring a C union:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--brhnD8M0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1lgyqijcps5v8xzjqahs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--brhnD8M0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1lgyqijcps5v8xzjqahs.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note : Size of the union is the the size of its largest field because sufficient number of bytes must be reservedto store the largest sized field.&lt;/p&gt;

&lt;p&gt;To access the fields of a union, use dot(.) operator i.e., the variable name followed by dot operator followed byfield name.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oUS4GCAN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rdlav4ijszotu5fyk5ll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oUS4GCAN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rdlav4ijszotu5fyk5ll.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Structures:&lt;br&gt;
Structure is a user-defined datatype in C language which allows us to combine data of different types together. Structure helps to construct a complex data type which is more meaningful. It is somewhat similar to an Array, but an array holds data of similar type only. But structure on the other hand, can store data of any type, which is practical more useful.&lt;/p&gt;

&lt;p&gt;Defining a structure:&lt;br&gt;&lt;br&gt;
struct keyword is used to define a structure. struct defines a new data type which is a collection of primary and derived datatypes.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;br&gt;
As you can see in the syntax above, we start with the struct keyword, then it's optional to provide your structure a name, we suggest you to give it a name, then inside the curly braces, we have to mention all the member variables, which are nothing but normal C language variables of different types like int, float, array etc.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dwi0Sc7t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uxn28pknn920rj5k60zs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dwi0Sc7t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uxn28pknn920rj5k60zs.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
After the closing curly brace, we can specify one or more structure variables, again this is optional.&lt;/p&gt;

&lt;p&gt;Note: The closing curly brace in the structure type declaration must be followed by a semicolon(;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f5rKhLcz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qv0cw34doc89tgmdt0hf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f5rKhLcz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qv0cw34doc89tgmdt0hf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Difference between Unions and Structures:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lBHG4Gk4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mwon3mcpx6sprzu2j4ka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lBHG4Gk4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mwon3mcpx6sprzu2j4ka.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>clanguage</category>
      <category>datatypes</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
