<?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 Rifna Mansoor on Medium]]></title>
        <description><![CDATA[Stories by Rifna Mansoor on Medium]]></description>
        <link>https://medium.com/@rifna0610?source=rss-91a94effe4ac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*K1cHXkhPkmm-lfD_</url>
            <title>Stories by Rifna Mansoor on Medium</title>
            <link>https://medium.com/@rifna0610?source=rss-91a94effe4ac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:59:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rifna0610/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 of C++]]></title>
            <link>https://medium.com/@rifna0610/data-types-of-c-90e4d395d118?source=rss-91a94effe4ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/90e4d395d118</guid>
            <dc:creator><![CDATA[Rifna Mansoor]]></dc:creator>
            <pubDate>Tue, 04 Oct 2022 07:23:07 GMT</pubDate>
            <atom:updated>2022-10-05T17:50:06.359Z</atom:updated>
            <content:encoded><![CDATA[<p>Data Types can be defined as the set of values which can be stored in a variable along with the operations that can be performed on those values.</p><p>The main aim of C++ program is to manipulate data. C++ defines several types of data and each type has unique characteristics.</p><p>C++ data types can be classified as:</p><ol><li>The fundamental data type(built-in data)</li><li>Derived Data type</li><li>User-defined data type</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*BaWv3bkLyC_D2VHi7kiayQ.jpeg" /></figure><h3><strong><em>The fundamental data type(built-in data)</em></strong></h3><p>The simple or fundamental data types are the primary data types which are not composed of any other data types.</p><p>The simple data types/fundamental data types include int, char, float, double and void.</p><h3>I<strong>nt type:</strong></h3><p>The int type is used to store integers. Integers are wholenumbers without any fractional parts.</p><p>This includes number such as 1, 45 and -9 are integers. 5.2 is not an integer because it contains a decimal point. The integer can be positive or negative values and the ranges of number we can store are from-32786 to 32767.</p><p>An integer is allocated 2 bytes (16 bits) of memory space. The possible operations include addition, subtraction, multiplication, division, remainder etc.</p><p>The General form of an integer declaration is: int variable_name;</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*Lel0Uzz4NlFFEgabBAqLiA.jpeg" /></figure><h3><strong>Char type:</strong></h3><p>It is character data type to store any character from the basic character set. Characters are enclosed in single quotation marks (‘). ‘A’, ‘a’, ‘b’, ‘9’, ‘+’ etc. are character constants.</p><p>When a variable of type char is declared, the compiler converts the character to its equivalent ASCII code.</p><p>A character is allocated only 1 byte (8 bits) of memory space. A character is represented in a program by the keyboard char.</p><p>The general form of a character declaration is: char variable_list;</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*3k-2a03P79ns5hGYhsbxiw.jpeg" /></figure><h3>Short type:</h3><p>Short is a data type that allows you to insert small integer values to a variable. It uses 2 bytes for a variable. So, if we insert a value between -32768 to 32767 we can use this data type.</p><h3><strong>Float type:</strong></h3><p>This represents the number with fractional part i.e. real numbers.</p><p>The float type is used to store real numbers. Number such as 1.8, 4.5, 12e-5 and -9.66 are all floating point numbers.</p><p>It can also be both positive and negative. The range of numbers we can store from -34e-38 to 3.4e38.</p><p>Float is allocated 4 bytes (32 bits) of memory space.</p><p>The general form of a float declaration is: float variable_name;</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*sGGHghesWGfkMJ95S4hQCg.jpeg" /></figure><h3><strong>Double type:</strong></h3><p>The double and float are very similar. The float type allows you to store single precision floating point numbers, while the double keyword allows you to store double precision floating point numbers.</p><p>Its size is typically 8 bytes of memory space.</p><p>The range of numbers we can store are from -1.7e308 to 1.7e308.</p><p>The general form of a double declaration is: double variable_list;</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Xs5IJgq76rGk1COxtt0A_g.jpeg" /></figure><h3><strong>Void type:</strong></h3><p>The void data type has no values and no operations. In other words both the set of values and set of operations are empty.</p><p>Example: void main( )</p><p>In this declaration the main function does not return any value.</p><h3><strong>Bool type:</strong></h3><p>The bool type has logical value true or false. The identifier true has the value 1, and the identifier false has the value 0.</p><p>The general form of a bool declaration is: bool variable_name;</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*ZOftxooZ5C_68gHqWAENJw.jpeg" /></figure><h3>Wide Char:</h3><p>Wide characters are similar to character datatype. The main difference is that char takes 1-byte space, but wide character takes 2-bytes (sometimes 4-byte depending on compiler) of space in memory.</p><p>For 2-byte space wide character can hold 64K (65536) different characters. So the wide char can hold UNICODE characters.</p><h3><strong><em>Derived data types</em></strong></h3><p>These data types are constructed using simple or fundamental data types. ( Array, Function, Pointer and References )</p><h3><strong><em>User defined data types</em></strong></h3><p>These data types are also constructed using simple or fundamental data types. ( Structure, Union, Class and Enumeration )</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90e4d395d118" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>