<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>delete operator | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/delete-operator/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 18 Aug 2011 11:41:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>What is the use of new and delete operator in C++?</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-faq/delete-operator/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-faq/delete-operator/#comments</comments>
		
		<dc:creator><![CDATA[Chitra]]></dc:creator>
		<pubDate>Thu, 18 Aug 2011 11:38:19 +0000</pubDate>
				<category><![CDATA[C Questions & Answers]]></category>
		<category><![CDATA[Delete]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[new operator]]></category>
		<category><![CDATA[delete operator]]></category>
		<category><![CDATA[new/delete]]></category>
		<category><![CDATA[new operator in C++]]></category>
		<category><![CDATA[delete operator in C++]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1634</guid>

					<description><![CDATA[<p>new operator is used to dynamically allocate memory on the heap. Memory allocated by new must be deallocated using delete operator. Syntax of new is: p_var = new type name; where p_var is a previously declared pointer of type typename. typename can be any basic data type. new can also create an array: p_var =</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-faq/delete-operator/">What is the use of new and delete operator in C++?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>new operator is used to dynamically allocate memory on the heap. Memory allocated by new must be deallocated using delete operator.</p>
<p>Syntax of new is:<br />
<strong>p_var = new type name;</strong><br />
where p_var is a previously declared pointer of type typename. typename can be any basic data type.</p>
<p>new can also create an array:<br />
<strong>p_var = new type [size];</strong><br />
In this case, size specifies the length of one-dimensional array to create.</p>
<p><strong>Example 1:</strong></p>
<p>int  *p;</p>
<p>p=new int;</p>
<p>It allocates memory space for an integer variable. And allocated memory can be released using following statement,</p>
<p>delete p;</p>
<p><strong>Example 2:</strong></p>
<p>int *a;</p>
<p>a = new int[100];</p>
<p>It creates a memory space for an array of 100 integers. a[0] will refer to the first element, a[1] to the second element, and so on. And to release the memory following statement can be used,</p>
<p>delete []a;</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-faq/delete-operator/">What is the use of new and delete operator in C++?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-faq/delete-operator/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
