<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shakira Saththar on Medium]]></title>
        <description><![CDATA[Stories by Shakira Saththar on Medium]]></description>
        <link>https://medium.com/@shakirasaththar?source=rss-29d4701420dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vXPBjQpzCntNOTWu</url>
            <title>Stories by Shakira Saththar on Medium</title>
            <link>https://medium.com/@shakirasaththar?source=rss-29d4701420dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 11:06:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shakirasaththar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[DATA TYPES in C++.]]></title>
            <link>https://medium.com/@shakirasaththar/data-types-in-c-cba23a2ebb23?source=rss-29d4701420dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/cba23a2ebb23</guid>
            <dc:creator><![CDATA[Shakira Saththar]]></dc:creator>
            <pubDate>Wed, 05 Oct 2022 06:16:28 GMT</pubDate>
            <atom:updated>2022-10-05T13:38:41.964Z</atom:updated>
            <content:encoded><![CDATA[<p>A key capability of a programming language.</p><p>The type of operations that can be performed with the data. For example, two integer numbers can be added, the population of a city can be calculated, etc.</p><p>Establishes both the type of information that can be stored as well as operations that can be done on that information.</p><p>There are two data types in C++ which are Fundamental data types and user defined data type. Fundamental data type includes short, int, float, double, bool and char. And also, user defined data type includes only string data type.</p><p>While doing programming in any programming language, you need to use various variables to store various information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. You may like to store information of various data types like short, character, integer, float, double, Boolean, string etc. Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory.</p><p>Let we discuss about the <strong><em>Fundamental Data Types</em></strong><em>.</em></p><p>Users can use Fundamental data type to <strong>defining a variable</strong>.</p><p>There are <strong>six</strong> data types in fundamental data type. They are,</p><blockquote><strong><em>I. Short :</em></strong></blockquote><p><strong>Short </strong>Data type is used to defining an integer values to a variable. It can be stored -32,768 to 32,767 this range of values in such type of variable. It takes 2-byte memory to store the value in memory.</p><blockquote><strong><em>II. Int:</em></strong></blockquote><p>This data type also used to defining an integer values to a variable but it can be stored -2,147,483,648 to 2,147,483,648 this range of values in such type of variable. Also, it takes 4 byte of memory to store the value in memory.</p><blockquote><strong><em>III. Float:</em></strong></blockquote><p><strong>Float</strong> data type is allows to insert a real number with 7 digits of precision. It stores values between -3.4 x 1038 to 3.4 x 1038 and it also takes 4 byte of memory to store the value in memory.</p><blockquote><strong><em>IV. Double:</em></strong></blockquote><p><strong>Doubl</strong>e data type also used to defining a real number, but it is defined real number with 15 digits of precision, and it stores values between -1.7 x 10³⁰⁸ to 1.7 x 10³⁰⁸. This requires 8 byte of memory space for a variable.</p><blockquote><strong><em>V. Bool:</em></strong></blockquote><p>Bool data type is used defining Boolean or logical values. It can define <strong>either true or false (1 or 0) only. </strong>It requires only 1 byte to store a data.</p><blockquote><strong><em>VI. Char:</em></strong></blockquote><p>Char data type is used to defining a Letters, digits, punctuation marks and control characters. This data type requires only 1 byte of memory to store the value in memory.</p><p><strong>*** The way to write a character constant.</strong></p><p><strong>Enclose the character within two single quotation mark like ‘S’.</strong></p><p><strong>‘S’ ≠ “S”.</strong></p><p>These are the things in fundamental data types. Next, we discuss about</p><p><strong><em>User defined Data type.</em></strong></p><p><strong>User defined data</strong> <strong>type</strong> includes only one data type. It’s called <strong>string </strong>data type.</p><blockquote><strong><em>I. String:</em></strong></blockquote><p>This data type is used to define Zero or more characters or sequence of characters. It takes 1 byte of memory per character to store the value in memory.</p><p><strong>*** The way to write a string constant.</strong></p><p><strong>Enclose the string within two double quotation mark like “Hello”.</strong></p><p><strong>(‘a’ is a char and “a” is a string).</strong></p><p><strong>*** User defined types are NOT variables. You still must declare variables to use the type. In order for types to be useful throughout your program, define the type in global scope.</strong></p><p>The following table shows the summary for the variable type, how much memory it takes to store the value in memory, and what is maximum and minimum value, which can be stored in such type of variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*HkqBV84ILIyi-Pm1oj2cug.png" /><figcaption><strong>Summary for all data types.</strong></figcaption></figure><p>The following coding shows the example for all Data type. it’s shows that how to define a data type and what are the outputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*OWVr0AVBzoN6DnqTnikhmA.png" /><figcaption><strong>Example Coding for all data type.</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m0UbZRpKyXblqBN-6t-WPA.png" /><figcaption><strong>Output for the coding.</strong></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cba23a2ebb23" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>